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编程实现简单的网页版计算器功能示例

php编程实现简单的网页版计算器功能示例

本文实例讲述了php编程实现简单的网页版计算器功能。分享给大家供大家参考,具体如下: 如何通过php代码来实现一个网页版的计算器的简单功能?下面就是通过php基础知识来做的网页版计算器,...

解析php多线程下载远程多个文件

复制代码 代码如下:function remote($urls, $name = '', $path = '', $dir = './images/') { if (!is_a...

php数组函数序列之array_unshift() 在数组开头插入一个或多个元素

array_unshift()定义和用法 array_unshift() 函数在数组开头插入一个或多个元素。 被加上的元素作为一个整体添加,这些元素在数组中的顺序和在参数中的顺序一样。...

php file_put_contents()功能函数(集成了fopen、fwrite、fclose)

命令:file_put_contents(); 命令解析:file_put_contents (PHP 5) file_put_contents -- 将一个字符串写入文件 说明: in...

PHP 网页过期时间的控制代码

当然,前提要先打开CDN中一个功能reload_into_ims on.这样用户发送过来no-cache也不怕了.因为这样会给给no-cache转成If-Modified-Since ....