言車新车|大阳VPS125混动踏板,长续航,代步通勤9980元起
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 企鹅小屋→300 元 月 256MB 内存 10GB SSD 空间 10虚拟空间(主机)
- vpsms→洛杉矶安畅 cn2 gia VPS 54 元 月 512m 全球[VPS测评]
- Name 域名限时优惠→COM 域名$7.99 年全球[VPS测评]
- JustHost→10.5 元 月 512MB 内存 5GB 空间 不限虚拟空间(主机)
- 腾讯云 2020 年 1 月促销:国内香港云服务器 2 核 4G6M14香港VPS[主机]
- RAKsmart→无限流量服务器月付 46 美元起 VPS 全场 8 折全球[VPS测评]
- DMIT→新用户买 PVM.LAX.Pro 送 3 个月 PVM.LAX全球[VPS测评]
- 便宜 ¥25 月 2 核 CPU 1G 内存 20G SSD 10Mbp香港VPS[主机]
- HostXen 预热双十一→充 300 送 100 续费减 10 元 新全球[VPS测评]
- Online - 独立服务器限时特惠 Start-2-M-SSD 月付€独立服务器[U]
- 8 月优惠 DiyVM→香港 CN2 线路 VPS 全场 5 折起优惠 WINDOWS
- WordPress插件:WP China Yes解决主题插件无法更新的问全球[VPS测评]
- 如何去除WordPress文章中的图像大小属性全球[VPS测评]
- Plus.hr-3.5$ 月 克罗地亚 1核1G内存20G硬盘 100G全球[VPS测评]
- CrownCloud -512M内存 1000G HDD 6T流量 1G全球[VPS测评]
- PacificRack → 512M 25G SSD 500G $12.全球[VPS测评]
- 实例 GIA0910629396 重启失败,原因:sudo: unabl全球[VPS测评]
- 40火伞高压电爬坡更让企业用电于民全球[VPS测评]
- earidc怎么样?香港三网cn2vps带宽1M月付29元香港VPS[主机]
- 桔子数据怎么样?便宜香港安畅CN2 VPS1核1G10M 28/月香港VPS[主机]
- 什么是云计算?全球[VPS测评]
- 全球云lovps,香港CN2线路vps 新品七折月付49元香港VPS[主机]
- 初忆云:香港美国cn2云服务器30元;香港cn2高防vps30元,美国1美国VPS[主机]
- 2020年国外VPS哪个最好?教你学会选择国外VPS全球[VPS测评]
- Ubuntu关机命令是什么?Ubuntu关机命令介绍全球[VPS测评]
- Rustrot-深绿色UI电商网站模板HTML5框架全球[VPS测评]
- 香港云服务器的优势有哪些方面香港VPS[主机]
- 跨境电商周报丨拼多多布局跨境电商平台;Shopify将推出新平台支持网红全球[VPS测评]
- swancloud:阿里云国际产品线,弹性云服务器等,便宜、无须实名、无全球[VPS测评]
- tmhhost:8折优惠,美国cn2 gia高防vps,香港NTT vp美国VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-232201.html











