首页  >  文章  >  php教程  >  php获取域名的google收录示例

php获取域名的google收录示例

WBOY
WBOY原创
2016-06-13 09:40:161074浏览

复制代码 代码如下:


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('/

[\S\s].*/Ui', $html,$index);
for($i=0;$iif(is_numeric($index['0'][$i])){
$count.=$index['0'][$i];
}
}
return $count;
}
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn