php获取域名的google收录示例

yipeiwu_com6年前PHP代码库
复制代码 代码如下:

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图像处理函数imagecopyresampled用法详解

本文实例讲述了php图像处理函数imagecopyresampled用法。分享给大家供大家参考,具体如下: 语法 复制代码 代码如下:bool imagecopyresampled (...

php中对xml读取的相关函数的介绍一

对象 XML解析函数 描述  元素 xml_set_element_handler() 元素的开始和结束  字符数据 ...

php中Y2K38的漏洞解决方法实例分析

本文实例分析了php中Y2K38漏洞的解决方法。分享给大家供大家参考。具体分析如下: Y2K38,又称 Unix Millennium Bug, 此漏洞将会影响到所有 32 位系统下用...

PHP使用file_get_content设置头信息的方法

本文实例讲述了PHP使用file_get_content设置头信息的方法。分享给大家供大家参考,具体如下: 直接上代码: <?php /** Accept applic...

php实现短信发送代码

卓望的短信发送。PHP格式。都要不习惯用xml传输数据格式了 标签: <无> 1. [代码][PHP]代码     <...