//podeshavanja pochetak
$title="Translate";
$description="Translate a word x3m.us";
$keywords="Translate, dictionary, free, x3m.us";
//podeshavanja kraj
//include pocetak
include("conf.php");
// include("../ref.php");
//include kraj
?>
include("../adcode.php");
include("../adshow.php");
?>
$s=$_GET['s'];
if(!$s){$s="x3m.us";
}
$from = $_GET['from'];
$to = $_GET['to'];
$q = $_GET['q'];
if(isset($q)){
$q=str_replace(" ","%20",$q);
$q=str_replace("+","%20",$q);
$lang=array(
"auto" => "Auto Detect",
"af" => "Afrikaans",
"sq" => "Albanian",
"ar" => "Arabic",
"hy" => "Armenian",
"az" => "Azerbaijani",
"eu" => "Basque",
"be" => "Belarusian",
"bg" => "Bulgarian",
"ca" => "Catalan",
"zh-CN" => "Chinese",
"hr" => "Croatian",
"cs" => "Czech",
"da" => "Danish",
"nl" => "Dutch",
"en" => "English",
"et" => "Estonian",
"tl" => "Filipino",
"fi" => "Finnish",
"fr" => "French",
"gl" => "Galician",
"ka" => "Georgian",
"de" => "German",
"el" => "Greek",
"ht" => "Haitian Creole",
"iw" => "Hebrew",
"hi" => "Hindi",
"hu" => "Hungarian",
"is" => "Icelandic",
"id" => "Indonesian",
"ga" => "Irish",
"it" => "Italian",
"ja" => "Japanese",
"ko" => "Korean",
"lv" => "Latvian",
"lt" => "Lithuanian",
"mk" => "Macedonian",
"ms" => "Malay",
"mt" => "Maltese",
"no" => "Norwegian",
"fa" => "Persian",
"pl" => "Polish",
"pt" => "Portuguese",
"ro" => "Romanian",
"ru" => "Russian",
"sr" => "Serbian",
"sk" => "Slovak",
"sl" => "Slovenian",
"es" => "Spanish",
"sw" => "Swahili",
"sv" => "Swedish",
"th" => "Thai",
"tr" => "Turkish",
"uk" => "Ukrainian",
"ur" => "Urdu",
"vi" => "Vietnamese",
"cy" => "Welsh",
"yi" => "Yiddish"
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://translate.google.com/m?sl=$from&tl=$to&q=$q");
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)");
$data = curl_exec($ch);
curl_close ($ch);
//echo "$data";
echo "
";
$sta=str_replace("%20"," ",$q);
$sta=htmlspecialchars($sta);
echo "Translate: $sta
";
echo "$lang[$from] => $lang[$to]";
echo "
";
echo "
";
echo "Translation:
";
$exp=explode("class=\"t0\">",$data);
$exp=explode("
",$exp[1]);
echo "
$exp[0] ";
$brxa=$_SERVER['HTTP_USER_AGENT'];
if($brxa==""){
echo "
";
}
$exp=explode("class=\"o1\">",$data);
$exp=explode("
",$exp[1]);
if(!$exp[0]){}else{ echo "
?>