$q=strtolower(trim($_GET['q']));
$q=matchdomain($q);
if($q==''){exit;}
function matchdomain($q){
preg_match('/(([a-z0-9]w{0,61}?[a-z0-9]|[a-zA-Z0-9]).){1,}(aero|arpa|asia|biz|cat|com|coop|co|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel|[a-z][a-z])(.[a-z][a-z]){0,1}/', $q, $matches);
return $matches[0];
}
for($i=0;$i<5;$i++){
$pagecode = @file_get_contents("http://www.baidu.com/s?rn=1&wd=site:".$q);
if($pagecode){
break;
}
}
if($pagecode){
preg_match('/百度一下,找到相关网页(约)?(.*?)篇,用时/', $pagecode, $baidus);
if($baidus[2]){
$sitebaidu=$baidus[2];
}else{
$sitebaidu=0;
}
echo "<script type="text/javascript教程">parent.document.getElementById("sitebaidu").innerHTML = "<a href=http://www.baidu.com/s?wd=site:".$q." target=_blank>".$sitebaidu."</a>";</script> ";
echo "<script type="text/javascript">parent.document.getElementById("sitebaidu2").innerHTML = "<a href=http://www.baidu.com/s?wd=site:".$q." target=_blank>".$sitebaidu."</a>";</script> ";
}else{
$sitebaidu=-1;
echo "<script type="text/javascript">parent.document.getElementById("sitebaidu").innerHTML = "<a href=indexed/rcsitebaidu.php教程?q=:".$q." target=recheck>u91cdu67e5</a>";</script> ";
echo "<script type="text/javascript">parent.document.getElementById("sitebaidu2").innerHTML = "<a href=indexed/rcsitebaidu.php?q=:".$q." target=recheck>u91cdu67e5</a>";</script> ";
}
require_once $_SERVER['DOCUMENT_ROOT'].'/inc/conn.php';
$sitebaidu=(int)str_replace(',','',$sitebaidu);
$domaindate=$q.'|'.date('Y-m-d',time());
$insertsql="UPDATE c_indexed sitebaidu='$sitebaidu' where domaindate='$domaindate'";
$result=mysql教程_query($insertsql);
//or die(mysql_error());