uuuvps:香港VPS低至97元/年,CN2+bgp网络,香港机房VPS优惠促销
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 免费主机 iON→1G 空间 25G 流量免费 WordPress 空间虚拟空间(主机)
- [11.11]DogYun→11.1-11.11 每日限量 65 折 香日本VPS[主机]
- Linux 中文乱码的解决办法全球[VPS测评]
- 便宜 $7 年 2G 内存 30G SSD 2T 流量@100Mbps 全球[VPS测评]
- hosts 文件位置全球[VPS测评]
- 线路不行-Wired Blade→$5 月 2GB 内存 20GB NV全球[VPS测评]
- uploadify-无刷新图片批量上传插件-.net 下批量上传图片并且全球[VPS测评]
- 腾讯云服务器 12 月秒杀 2 核 4G3M998 元 3 年 2 核 全球[VPS测评]
- Chrome插件Personal Blocklist全球[VPS测评]
- 如何在WordPress博客实现历史上的今天的小功能全球[VPS测评]
- WordPress网站上传图片出现http报错解决办法全球[VPS测评]
- Eniyisunucum-1.6$ 月 土耳其VPS 1核2G内存30G全球[VPS测评]
- Terrahost-尼日利亚拉各斯VPS 30折扣 7$ 月 2G内存 全球[VPS测评]
- 什么是Bootstrap?全球[VPS测评]
- 文物、沉船、村落!干旱导致大量遗迹重见天日 2022年干旱还要持续多久?全球[VPS测评]
- 什么是VPS?国内VPS有哪些?全球[VPS测评]
- 向日葵-漏洞科普:海外云服务器三种漏洞修复方法快收藏起来!全球[VPS测评]
- 春天的风最容易温暖心灵,适合朋友圈和抖音的12条文案全球[VPS测评]
- 为什么要拥有一台VPS?全球[VPS测评]
- 企鹅小屋:深港IPLC节点,0.25元/G流量,不用不花钱全球[VPS测评]
- 亚当云怎么样?香港安畅cn2vps带宽10M月付28元香港VPS[主机]
- hostkvm怎么样?香港云vps 带宽30M 月付6美元香港VPS[主机]
- 如何根据业务需求选择合适的云服务器配置?全球[VPS测评]
- OneTechCloud易科云双十二优惠:香港/美国CN2全场VPS季付美国VPS[主机]
- 香港的云服务器值得租用吗?有什么好处?香港VPS[主机]
- 孤狼云:香港CN2/美国CN2 VPS首月特价¥6.8元;香港虚拟主机仅美国VPS[主机]
- 跨境电商洋码头生死攸关:买手流失资金被冻结保全全球[VPS测评]
- 拼多多拟建跨境电商平台:挖角SHEIN员工,0佣金招商入驻全球[VPS测评]
- 恒创科技:开年采购季_香港CN2云服务器/美国CN2线路,低至299元/美国VPS[主机]
- wikihost微基主机服务,香港稳定虚拟主机8折,3.73元/月起,C香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-235451.html











