龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

php获取域名的google收录

时间:2014-07-22 14:52来源: 作者: 点击:
分享到:
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;
   }
精彩图集

赞助商链接