php获取域名的google收录示例

复制代码 代码如下:
function get_index($domain){
$url="http://www.google.com/search?source=hp&biw=1440&bih=762&q=site%3A$domain&aq=f&aqi=g10&aql=&oq=";
$html=file_get_contents($url);
preg_match('/<div id=resultStats>[/S/s].*<nobr>/Ui', $html,$index);
for($i=0;$i<=strlen($index['0']);$i++){
if(is_numeric($index['0'][$i])){
$count.=$index['0'][$i];
}
}
return $count;
}

php技术php获取域名的google收录示例,转载需保留来源!

郑重声明:本文版权归原作者所有,转载文章仅为传播更多信息之目的,如作者信息标记有误,请第一时间联系我们修改或删除,多谢。