ExCloud:1核256M存/8GB SSD空间/100GB流量/OVZ7/深港IPLC/沪港IPLC,46.4元/月
|
![]() |
![]() |
![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |
首先如何获取必应的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
- Fatal error: Allowed memory size of 全球[VPS测评]
- 云服务器和云服务器租用,云服务器做什么?? 全球[VPS测评]
- 为什么要拥有一台VPS? 全球[VPS测评]
- 缓解云计算人才焦渴,苏州工业园区用三年引得源头活水来 全球[VPS测评]
- 实例 GIA0910629396 重启失败,原因:sudo: unabl 全球[VPS测评]
- 二三互联,香港cn2云服务器5折+85折双重优惠,稳定不限流量,1核1G 香港VPS[主机]
- centos7如何查看firewall防火墙状态:开启/关闭/重启防火墙 全球[VPS测评]
- HostXen:双十一新用户香港、日本vps,送20元代金券,充值300 日本VPS[主机]
- tudcloud:香港vps/2核/2GB/20GB空间/不限流量/KV 虚拟空间(主机)
- HostHatch:1核/2GB/20GB空间/KVM/香港/洛杉矶/纽 虚拟空间(主机)
- 阳帝云双十二活动:1核1G10M大宽带香港BGP云服务器,月付14元 香港VPS[主机]
- 景文互联年终特惠:日本/香港/美国VPS全场7折+送内存,充1000送3 日本VPS[主机]
- PQhosting:香港HE/乌克兰/俄罗斯/荷兰/摩尔多瓦vps主机/ 香港VPS[主机]
- 米上云:免备案香港云服务器,全场75折优惠码,香港高防vps月付23元起 香港VPS[主机]
- CYUN:开工促销,香港云服务器/美国高防vps/香港物理服务器85折 美国VPS[主机]
- 傲游主机:香港CN2高防云主机8折158元/月起(最高50G防御/2核2 香港VPS[主机]
- 阳帝云:3月优惠活动,香港GIA/香港TG/洛杉矶200G硬防vps,首 香港VPS[主机]
- 腾讯云美国硅谷服务器/香港/新加坡:1核1G(Linux)云服务器仅28 美国VPS[主机]
- 野草云:香港CN2VPS年付36折,137元/年;独立服务器350元月起 独立服务器[U]
- 月神科技:香港沙田机房vps优惠码首月8折,1核/1G/40G SSD/ 香港VPS[主机]
- 什么是分布式拒绝服务攻击,其原理及防范措施 全球[VPS测评]
- 网站迁移服务器是如何运作的?新手站长看完这篇文章,很容易就能看完。 全球[VPS测评]
- 菜单选中标记CSS3动画效果 全球[VPS测评]
- 晚点独家丨拼多多9月上线跨境电商平台,首站美国 美国VPS[主机]
- 云计算拯救互联网巨头:谁抢跑,谁追赶? 全球[VPS测评]
- 实例 GIA0910629396 重启失败,原因:sudo: unabl 全球[VPS测评]
- 全球云lovps,香港CN2线路vps 新品七折月付49元 香港VPS[主机]
- CombCloud,香港沙田CN2VPS测评,2核1G52元/月,安畅C 香港VPS[主机]
- locvps:香港cn2vps(葵湾机房),2核2G40g硬盘,8折优惠 WINDOWS
- 咖啡主机:美国高防vps、香港vps 可享受6-7折促销 每月仅需14元 美国VPS[主机]
转载请注明原文地址: http://140.238.13.167:12355/read-234617.html











