php获取域名的google收录示例

前端之家收集整理的这篇文章主要介绍了php获取域名的google收录示例前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

<div class="codetitle"><a style="CURSOR: pointer" data="61535" class="copybut" id="copybut61535" onclick="doCopy('code61535')"> 代码如下:

<div class="codebody" id="code61535">
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;$i<=strlen($index['0']);$i++){
if(is_numeric($index['0'][$i])){
$count.=$index['0'][$i];
}
}
return $count;
}

原文链接:https://www.f2er.com/php/24892.html

猜你在找的PHP相关文章