野草云:2021开年大促 – 香港VPS 136.8元年起;香港服务器350元月
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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 $6 月 512M 内存 15G 硬盘 200Mbps 不全球[VPS测评]
- 人太多了-Hosteons→洛杉矶 VPS 1 核 512M 内存 5G全球[VPS测评]
- ZJI 春季香港葵湾特惠型六折优惠 香港邦联 云地数据中心六五折优惠 香香港VPS[主机]
- AnyueHost→1200 元 月 E3-1265LV3 8GB 内存日本VPS[主机]
- CloudFlare 的 DNS 1.1.1.1 和 新出的免费 Clo全球[VPS测评]
- MySQL:1248 - Every derived table mus全球[VPS测评]
- 智商税-GigsGigsCloud→马来西亚 VPS 1 核 512M 全球[VPS测评]
- 帝国 cms 评论列表 showplinfo 标签调用会员头像 user全球[VPS测评]
- imidc→香港服务器 50 刀 月;香港站群服务器(8C) 195 美站群服务器[IP]
- WordPress 文章去重 删除 WordPress 重复文章的两种有全球[VPS测评]
- linux(ubuntu centos)下开启 mysql 远程访问权限全球[VPS测评]
- 企鹅小屋→韩国 CN2 日本 CN2 独立服务器特价优惠 550 月 大独立服务器[U]
- 疯狂猜成语 图猜成语一个老人说了很多话旁边一个人在叹气是什么成语?全球[VPS测评]
- 如何不需要使用插件就可以实现WordPress代码高亮功能全球[VPS测评]
- tmhhost 开学季促销 日本软银线路、洛杉矶三网cn2 gia 线路日本VPS[主机]
- QuadraNet机房洛杉矶便宜服务器,E3处理器,30TB大流量, $全球[VPS测评]
- WordPress如何手动还原到旧版本全球[VPS测评]
- 宏海数据9.9云服务器:香港VPS CN2线路1核1G 9.9/首月香港VPS[主机]
- 企鹅小屋:深港IPLC节点,0.25元/G流量,不用不花钱全球[VPS测评]
- 冀青云怎么样?香港CN2-GIA vps月28元/香港NTT 月9元香港VPS[主机]
- 做跨境电商一个月都有多少收入?全球[VPS测评]
- 创意IT服务公司主页网站模板 - Softets全球[VPS测评]
- 2022年亚马逊Prime会员日将于7月12日和13日举行,覆盖24个站全球[VPS测评]
- TabbyCloud:1核512MB内存/20GB/500GB流量/KV香港VPS[主机]
- 宝塔面板在香港服务器安装启动不了nginx怎么办?香港VPS[主机]
- 消费复苏形势良好,我们将多措并举实施扩大内需政策全球[VPS测评]
- wikihost,微基主机服务,100M带宽香港tudcloud,5G防香港VPS[主机]
- ucloud云主机怎么样?ucloud云服务器1核2G仅52元/年起;香香港VPS[主机]
- 奶兔云:便宜香港VPS,香港CN2 VPS低至21元/月,香港CN2线路香港VPS[主机]
- 华为S2300 系列交换机如何修改密码?全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-247160.html











