php获取域名的google收录示例
更新时间:2014年03月24日 17:20:26 作者:
这篇文章主要介绍了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实现的Curl封装类Curl.class.php用法实例分析
这篇文章主要介绍了php实现的Curl封装类Curl.class.php用法,以完整实例形式较为详细的分析了Curl封装类的定义及相关使用技巧,具有一定参考借鉴价值,需要的朋友可以参考下2015-09-09


最新评论