技术文章:PHP百度收录量查询接口源码,百度收录量API查询PHP源码
优采云 发布时间: 2022-11-25 17:28技术文章:PHP百度收录量查询接口源码,百度收录量API查询PHP源码
百度索引 API 查询 PHP 源代码
/*
插件名称:百度索引
版本:1.0
描述:基于域名返回百度索引
作者: 绿色之旅
作者网址:
*/$domain = (isset($_GET['domain']))?$_GET['domain']
:$_POST['domain'];
if(empty($domain)) echo 'query domain name can of empty';
$count = 百度SL ($domain);
if(!isset($count)) showjson(array('code'=>200502,'msg'=>' 查询失败,请重试! '));
if(!$count) $count = 0;
" />
$result=数组('
code'=>1,'
域'=>$domain,
“数据”=>$count
);
print_r(json_encode($result));
unset($value,$url_arr,$domain,$row,$hostrow,$site,$resulturl,$result,$ch);
function baiduSL ($domain) {
$baidu='%3A'.$domain;
$bdsite=BD_curl($baidu);$bdsite = str_replace(array(“\r\n”, “\
r”, “\n”, ' '), '', $bdsite);
preg_match(“/本网站有 (.*?) 由百度/i索引的页面”, $bdsite, $count);
如果 (!$count) preg_match('/找到的相关结果数约为 (.*?) /i', $bdsite, $count);
ereg(“本网站共有百度索引的(.*)页面”,$bdsite,$count);/
" />
/print_r($count);
$count=str_replace(“本网站共有”,“”,$count);
$count=str_replace(“百度索引的页面”、“$count”);$count = str_replace(array(“\r\n”, “\r”, “\n”, ',', ' '
), '', $count);
$baiduSL=strip_tags($count[1]);
未设置($count);
返回$baiduSL;
}函数 BD_curl($url, $post=0, $referer=0, $cookie=0, $header=0, $ua=0
, $nobaody=0){
$ch = curl_init();$ip = 兰德(0,255).'.'.兰德(0,255).'..兰德(0,255).
'..兰德(0,255) ;
curl_setopt($ch、CURLOPT_URL、$url);
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,假);
curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,假);
本站大量销售关键词数据库和关键词采集软件,包括百度、谷歌、360搜索、搜狗、淘宝等中文搜索引擎和谷歌英文搜索引擎。欢迎联系我们!
" />
关键词 是一款专业的长尾关键词采集
和挖掘工具。本站推出最好的百度关键词工具,关键词采集
,关键词挖掘服务!
本站所售软件均为正版软件,无需注册,无使用限制,一次购买,终身免费技术支持!(免费服务不包括新版本更新)
" />
郑重声明:本站所有软件工具仅供学习研究使用,严禁用于任何非法用途,否则后果自负!
©关键词 采集
2019-2022 最好用的长尾关键词&URL采集工具。网站地图