$domain = $_SERVER["HTTP_HOST"]; //$domain ="http://www.tinytechindia.com/soswtii.htm"; $files = array("english.php", "spanish.php", "german.php", "french.php", "italian.php", "portuguese.php", "japanese.php", "korean.php", "chinese.php"); $md5 = "tcache/" . md5("http://" . $_SERVER["HTTP_HOST"] . $_SERVER["PHP_SELF"] . "?" . $_SERVER["QUERY_STRING"]); if(file_exists($md5)){ if(time() < filemtime($md5) + 86400*$trans_cache_days | $trans_cache_days == 0){ $html = file_get_contents($md5); echo $html; exit; } } if(!isset($_GET["u"])){ $tgurl = "http://64.233.179.104/translate_c?hl=en&ie=UTF-8&oe=UTF-8&langpair=$lang&u=" . urlencode("http://$domain$trans_folder") . "&prev=/language_tools"; $html = file_get_contents($tgurl); if(!$html){ $html = file_get_contents($tgurl); } } else{ $parse = parse_url($_GET["u"]); if(strtolower(str_replace("www.", "", $parse["host"]))==strtolower(str_replace("www.", "", $domain))){ $langfile = false; foreach($files as $file){ if(strpos($_GET["u"], $file)){ $langfile = true; header("Location: $_GET[u]"); exit; } } $html = file_get_contents("http://64.233.179.104/translate_c?hl=en&ie=UTF-8&oe=UTF-8&langpair=$lang&u=" . urlencode($_GET["u"]) . "&prev=/language_tools"); } else{ header("Location: $_GET[u]"); exit; } } $lparts = explode("|", $lang); $html = str_replace(array("", ""), "", $html); $html = str_replace("