php获取域名的google收录
div br / /div
function get_index($domain){
$index=array();
$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 获取指定时间所在月份的天数
精彩图集
精彩文章






