MOON
Server: Apache
System: Linux 54-179-220-51.cprapid.com 3.10.0-1160.144.1.el7.tuxcare.els4.x86_64 #1 SMP Tue Apr 7 08:40:40 UTC 2026 x86_64
User: thehunarfound (1001)
PHP: 7.4.29
Disabled: NONE
Upload Files
File: /home/thehunarfound/public_html/sms/lib/google_translation/example_curl.php
<?php
require("GTranslate.php");
$translate_string = "<p><u><em><strong>WASHINGTON</strong></em></u>: </p>
<p>Top Republican lawmaker John Boehner hinted at a potential freeze Thursday of funds for US military operations in Libya, saying White House had failed to justify its involvement.  In face of Republican criticism, President Barack Obama insisted in a 30-page report to lawyers Wednesday that the current US military action in Libya was legal.  And the White House argued US participation in the NATO-led assault on Moamer Kadhafi's forces did not require congressional authorization as the US role was only a supporting one.  But Boehner, speaker of the Republican-controlled House of Representatives, said he was not satisfied with the administration's arguments.  &quot;The White House says there are no hostilities taking place. Yet we've got drone attacks under way; we're spending $10 million a day; we're part of an effort to drop bombs on Kadhafi's compounds,&quot; he told reporters.  &quot;It just doesn't pass the straight face test, in my view, that we're not in the midst of hostilities.&quot;  Asked what options faced lawmakers, Boehner said: &quot;The House has options. We're looking at those options, and my guess is that next week we may be prepared to move on those options.  &quot;But the ultimate option is the House, in fact the Congress has the power of the purse. And certainly that is an option as well.&quot;  Lawmakers have protested that the White House did not seek congressional approval for US involvement in Libya as set out in 1973 War Powers Resolution, which requires direct, offensive warfare to be endorsed by Congress.  &quot;It's been four weeks since the president has talked to the American people about this mission, and I think it's time for the president to outline to the American people why we are there, what the mission is and what our goals are and how do we exit this,&quot; Boehner added.  But the White House argued congressional approval was not needed.  &quot;US forces are playing a constrained and supporting role in a multinational coalition,&quot; the White House report said.  It noted that the use of force was being used solely to protect civilians, enforce a no-fly zone and an arms embargo.  &quot;US operations do not involve sustained fighting or active exchanges of fire with hostile forces, nor do they involve the presence of US ground troops, US casualties or a serious threat thereof, or any significant chance of escalation into a conflict characterized by those factors,&quot; the report said. (AFP)</p>
<p>
KARACHI: The case of a young child killed by the Rangers last month could not be registered in court till recently despite the efforts of the affected family, Geo News reported. The incident took place last month in the area of Manghopir. 
The incident took place when Rangers entered the house of the child claiming they were conducting a search. The residents mistook them for burglars and child’s father, Gul Khan used aerial firing to scare them away. 
It is important to mention here that Gul Khan was using a licensed gun. His action prompted the Rangers to retaliate and as a result 13-year-old Islam Bahadur and another relative Khan Bahadur were injured. 
The Rangers did not take the injured to the hospital but continued to interrogate them for an hour. 
Instead of admitting their mistake, the Rangers termed the residents of the house ‘criminals’. 
No inquiry has so far been conducted against the Rangers. Even after killing 13-year-old, officials felt no remorse. 
The Rangers in collaboration with the police, arrested Khan Bahadur under false charges. It was after media coverage that Bahadur was released and the court ordered that a case be launched against the Rangers personnel involved in the incident. 
Gul Khan Afridi is unable to register his youn son’s killing case at the hands of the Rangers despite having sufficient evidence.
</p>
<p>
ISLAMABAD: The Supreme Court of Pakistan (SC) has admitted for hearing a constitutional petition of the Pakistan Federal Union of Journalists (PFUJ), seeking formation of a high-powered judicial commission under an apex court judge to probe the Saleem Shahzad murder case, and the first hearing will be held on Friday (today).
According to SC Registrar Dr Faqeer Hussain, a three-member Supreme Court bench, led by Chief Justice Iftikhar Muhammad Chaudhry, and comprising Justice Tariq Mahmood and Justice Ameer Hani Muslim, will hear the petition. 
The PFUJ, invoking Article 184-3 of the constitution, has sought the SC order about formation of a high-powered judicial commission under a Supreme Court judge to probe the mysterious circumstance in which renowned journalist Saleem Shahzad was kidnapped and killed. 
</p>
<p>
UNITED NATIONS: The UN Security Council on Friday split the international sanctions regime for the Taliban and al Qaeda in a bid to encourage the Taliban to join reconciliation efforts in Afghanistan.
The council unanimously passed two resolutions which set up one new blacklist of individuals and organizations accused of links to al Qaeda and a second for those me.</p>
";
 try{
   $gt = new Gtranslate;
	$gt->setRequestType('curl');
	echo  html_entity_decode(htmlentities($gt->english_to_spanish($translate_string)."<br/>",ENT_QUOTES,"UTF-8"));
	echo "<br>====================================================================================<br>";
	$translate_string2="NACIONES UNIDAS: El Consejo de Seguridad el viernes dividir el régimen de sanciones internacionales por los talibanes y Al Qaeda en un intento por alentar a los talibanes a unirse a los esfuerzos de reconciliación en Afganistán.
El consejo aprobó por unanimidad dos resoluciones que establecen una nueva lista negra de individuos y organizaciones acusados ​​de vínculos con Al Qaeda y el segundo para los me. </ P>";
	echo  (htmlentities($gt->spanish_to_english($translate_string2)."<br/>",ENT_QUOTES,"UTF-8"));
	
	echo "<br>====================================================================================<br>";
	$translate_string2="NACIONES UNIDAS: El Consejo de Seguridad el viernes dividir el régimen de sanciones internacionales por los talibanes y Al Qaeda en un intento por alentar a los talibanes a unirse a los esfuerzos de reconciliación en Afganistán.
El consejo aprobó por unanimidad dos resoluciones que establecen una nueva lista negra de individuos y organizaciones acusados ​​de vínculos con Al Qaeda y el segundo para los me. </ P>";
	echo  (htmlentities($gt->spanish_to_spanish($translate_string2)."<br/>",ENT_QUOTES,"UTF-8"));

	echo "<br>====================================================================================<br>";
	$translate_string2="<p>
UNITED NATIONS: The UN Security Council on Friday split the international sanctions regime for the Taliban and al Qaeda in a bid to encourage the Taliban to join reconciliation efforts in Afghanistan.
The council unanimously passed two resolutions which set up one new blacklist of individuals and organizations accused of links to al Qaeda and a second for those me.</p>";
	echo  (htmlentities($gt->english_to_english($translate_string2)."<br/>",ENT_QUOTES,"UTF-8"));
	
	

} catch (GTranslateException $ge)
 {
       echo $ge->getMessage();
 }

?>
<?php
/****************************\
|Google Translation API      |
\****************************/
function google_translate($text, $lang_to, $lang_from='en'){
  $lang_to = strtolower($lang_to);
  $lang_from = strtolower($lang_from);
  $lang_pat = $lang_from .'|'. $lang_to;
  $langs = array('ar|en', 'zh|en', 'zh-CN|zh-TW', 'zh-TW|zh-CN', 'nl|en', 'en|ar', 'en|zh-CN', 'en|zh-TW', 'en|nl', 'en|fr', 'en|de', 'en|el', 'en|it', 'en|ja', 'en|ko', 'en|pt', 'en|ru', 'en|es', 'fr|en', 'fr|de', 'de|en', 'de|fr', 'el|en', 'it|en', 'ja|en', 'ko|en', 'pt|en', 'ru|en', 'es|en');
  $match = false;
  foreach ($langs as $lang){
    if ($lang==$lang_pat){
      $match = true;
      break;
    }
  }
  if ($match){
    $curl = curl_init();
    $url = 'http://translate.google.com/translate_t?langpair='. $lang_pat;
    $post = 'hl=en&ie=UTF8&text='. $text .'&langpair='. $lang_pat;
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
    $page = curl_exec($curl);
    curl_close($curl);
    preg_match('/<div id=result_box dir="ltr">(.*?)<\/div>/i', $page, $matches);
    $page = $matches[1];
    $page = str_replace('<br>', '
', $page);
    return $page;
  }else{
    echo 'Error: invalid language in str_translate()';
    return false;
  }
}

//echo google_translate("hello world",'en','es');
?>