UCloud:香港云服务器,1核1G内存89元/年起(可选购3年/CN2 GIA线路/100%CPU性能)
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 疯狂猜成语 图猜成语李字箭头指着一个戴着写着张的帽子的人是什么成语?全球[VPS测评]
- Ftpit→$15 年 OpenVZ-512MB 10G SSD 1TB全球[VPS测评]
- php 获取客户端 ip 的最简单方法全球[VPS测评]
- 新商家慎重-伏羲主机(6le)香港 cera 机房便宜 VPS 主机 1香港VPS[主机]
- HKServerSolution CN 常州高带宽 VDS,电信联通线路全球[VPS测评]
- HKServerSolution→699 元 年 2G 内存 15GB 虚拟空间(主机)
- 便宜 腾讯云 88 元 年的 1G 云服器又开卖了 每天 4 场秒杀 场全球[VPS测评]
- 口字上面有一个病字是什么成语?全球[VPS测评]
- Psychz→$10 月 D525 4GB 内存 500GB 硬盘 30日本VPS[主机]
- 便宜 VPS $1.49 月 2CPU 512M 内存 10G SSD 全球[VPS测评]
- 几款常用的WordPress性能优化缓存插件全球[VPS测评]
- DediPath便宜独立服务器夏日促销,默认1Gbps带宽,20Gbps独立服务器[U]
- 可能违规的5个Google Adsense广告规则全球[VPS测评]
- PacificRack 便宜 VPS 512m内存 10G纯ssd 1T全球[VPS测评]
- xServere → €4 月 罗马尼亚 法国 1C2G40G硬盘 1G全球[VPS测评]
- Dhyhost-6.6$ 月 1核2G内存20G硬盘 国际100M 印度美国VPS[主机]
- CloudCone 512 内存 10G HDD 1T流量 洛杉矶 MC全球[VPS测评]
- Virmach Summer Sale → $9年付 512M $15年全球[VPS测评]
- Cloudcone → 512M 10G SSD 1T $2.22月付全球[VPS测评]
- 快速云:云计算分类和云计算的特点全球[VPS测评]
- 20个温暖心灵的问题,抖音,朋友圈都可以拿去发。全球[VPS测评]
- 什么是IconFont ?iconfont 的使用和解析全球[VPS测评]
- earidc怎么样?香港三网cn2vps带宽1M月付29元香港VPS[主机]
- kvmloc:E5-26XX/16G/1T HDD/20Mbps不限流量日本VPS[主机]
- 香港cn2线路服务器哪里好?香港cn2服务器推荐哪家好?香港VPS[主机]
- UOVZ怎么样?香港30M大带宽VPS 直连线路月付50元香港VPS[主机]
- 购买香港服务器需要做哪些准备香港VPS[主机]
- 厘米云,江苏移动100G高防云服务器,4核4G内存20M带宽79元/月全球[VPS测评]
- 三优云uuuvps:春节促销,香港cn2 vps低至168元/年,多款配香港VPS[主机]
- BBR对比BBR2BBRPLUSBBR2CAKE锐速哪个效果好全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-248353.html











