小鹿云计算:香港双程cn2首月6折优惠;美国300G高防-8元/月;香港站群服务器20M+120IP-666元
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的api密钥
直接上代码,复制保存为post.php,然后通过宝塔面板的计划任务添加即可。
<?php$arr = array( 'https://www.esphp.com.com' => array( 'url' => array( "https://www.esphp.com/sitemap.xml" ), 'bing_key' => "303c2be9581c432da0f65c6b2fa1b416" ),);foreach ($arr as $i => $j) { //网站地址 $website = $i; //站点地图 $url = $j['url']; //必应key $bing_key = $j['bing_key']; //配额接口调用地址 $quota_api = "https://ssl.bing.com/webmaster/api.svc/json/GetUrlSubmissionQuota?siteUrl=$website&apikey=$bing_key"; //URL提交API接口调用地址 $seturl_api = "https://ssl.bing.com/webmaster/api.svc/json/SubmitUrlBatch?apikey=$bing_key"; $s = file_get_contents($quota_api); $s = json_decode($s, true); echo "$website 必应今日剩余配额:".$s['d']['DailyQuota']." 本月剩余配额:".$s['d']['MonthlyQuota'];echo '<br>'; if($s['d']['DailyQuota']){ $ch = curl_init(); //防https错误 $xmlresponse = curl_exec($ch); $xml=simplexml_load_string($xmlresponse); $urls = array(); foreach ($url as $key => $value) { curl_setopt($ch, CURLOPT_URL, $value); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $xmlresponse = curl_exec($ch); $xml=simplexml_load_string($xmlresponse); foreach ($xml as $key => $value) { $urls[] = $value->loc; } } shuffle($urls); //必应api提交每次上限100条 if ($s['d']['DailyQuota']>=100) { $max = 100; } else { $max = $s['d']['DailyQuota']; } $urls = array_slice($urls, 0,$s['d']['DailyQuota']); if(!$urls){ echo $website.' 今日配额已全部提交!';continue; } $url_data = array_chunk($urls, $max, true); foreach ($url_data as $key => $value) { $url_str = implode(',',$value); $url_arr = explode(',',$url_str); $data = array( "siteUrl"=>$website, "urlList"=>$url_arr ); $ch = curl_init(); $options = array( CURLOPT_URL => $seturl_api, CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => json_encode($data), CURLOPT_HTTPHEADER => array('Content-Type: application/json'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); echo "$website 必应提交信息:".$result;echo '<br>'; } }}?>将必应提供的key和站点地图修改为自己的即可
[主机测评]历史优惠活动内容
猜你可能想看的VPS
- 搬瓦工→新增 10Gbps 带宽的 cn2 gia 线路 VPS 移动+全球[VPS测评]
- dedecms 删除标题重复的文章 dedecms 删除采集重复的数据全球[VPS测评]
- binarylane→$4 月 1GB 20GB SSD 空间 1TB 虚拟空间(主机)
- 疯狂猜成语 图猜成语滅字的三点水是木头是什么成语?全球[VPS测评]
- 腾讯内部单边拥塞算法 BBR-TCPA 一键脚本安装及速度测评全球[VPS测评]
- RAKsmart 开年大促优惠活动最后三天→E3-1230 服务器低至$全球[VPS测评]
- 不建议年付-ParkinHost→50 欧元 年 200Mbps 宽带 全球[VPS测评]
- 玩具-Hosting-russia→5 元 月 512MB 内存 10G全球[VPS测评]
- dedecms 后台无法登陆 dedecms 后台登陆跳转回登录页全球[VPS测评]
- WordPress百度、Google蜘蛛爬行记录插件:Spider Tr全球[VPS测评]
- 篱落主机 香港多线BGP VPS 黑五特惠 全场5折终身优惠码香港VPS[主机]
- 用XAMPP搭建本地PHP测试环境及安装WordPress全球[VPS测评]
- 给WordPress博客添加一个搜索引擎蜘蛛爬行及分析页面全球[VPS测评]
- tmhhost 开学季促销 日本软银线路、洛杉矶三网cn2 gia 线路日本VPS[主机]
- 青云互联 香港安畅 CN2GIA VPS八折优惠 1G内存/单核/5Mb香港VPS[主机]
- 酷锐云双十一 香港电信GIA 月付最低32元 美国CERA GIA 20美国VPS[主机]
- 如何检测WordPress博客的访问速度?全球[VPS测评]
- bacloud拉脱维亚便宜服务器,14核E5-2650L处理器/16GB全球[VPS测评]
- 酷锐云双十一 香港电信GIA 月付最低32元 美国CERA GIA 20美国VPS[主机]
- HostSailors特惠 256M内存/10G硬盘/1Gbps带宽/罗全球[VPS测评]
- 昱格云 1核心 1024M内存 10G SSD 1000G单向流量 10全球[VPS测评]
- CubeCloud,靠谱的香港cn2vps,美国cn2终身九折,原生IP美国VPS[主机]
- 8K超高清记录中国空间站凌月:天和核心舱与问天实验舱组成“土”字结构虚拟空间(主机)
- 跨境电商有哪些平台?十大跨境电商平台!全球[VPS测评]
- EdgeNAT,香港CN2+BGP vps 带宽5M 月付72元香港VPS[主机]
- 人们为啥不爱吃海底捞了?海底捞上半年亏损达2.97亿 网友神评扎心全球[VPS测评]
- 中国云计算,能啃的只剩硬骨头了全球[VPS测评]
- 美国信贷市场的痛苦将不亚于上世纪70年代的通胀时期美国VPS[主机]
- 咖啡主机:美国高防vps、香港vps 可享受6-7折促销 每月仅需14元美国VPS[主机]
- 特网云:高防香港云主机/CN2/真实防御/30G高防御/金盾防护无视CC香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-249617.html











