gcorelabs:KVM主机€1.08/月起;俄罗斯/美国/香港/日本/韩国/新加坡等26个机房可选
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 动力云→201 元 月 1GB 内存 10GB SSD 空间 10TB 虚拟空间(主机)
- 解决浏览器不能正常下载 txt 而是直接打开的问题(HTML 版本)全球[VPS测评]
- 绕的厉害-RivenCloud→爱沙尼亚 VPS 2 核 1G 内存 1全球[VPS测评]
- stsdust 广州移动 vds 预售,1Gbps 带宽无限流量,硬件资全球[VPS测评]
- 疯狂猜成语 图猜成语一片草和一个人被拦腰斩断是什么成语?全球[VPS测评]
- 送美元 RackNerd 春节促销→登陆 购买最高送$188 红包 独立独立服务器[U]
- 双十一预告 搬瓦工→双十一当天全场 11.11%优惠 DC6 传家套餐会全球[VPS测评]
- RAKsmart 五月促销,美国服务器$46 月起,大陆优化 CN2 线站群服务器[IP]
- HostKvm 七月优惠→香港国际 美国防御 VPS 限量七折优惠美国VPS[主机]
- Rainbow Cloud→$30 月 E3-12XX 8G 内存 1T日本VPS[主机]
- RackForest→$6 月 1GB 内存 20GB SSD 空间 2虚拟空间(主机)
- Superspeed.sh 一键脚本测试搬瓦工 VPS上传下载速度和延迟全球[VPS测评]
- PS 打不开 WebP 图片的解决方法全球[VPS测评]
- wordpress 上传附件报错 “抱歉,出于安全的考虑,不支持此文件类全球[VPS测评]
- centos7如何查看firewall防火墙状态:开启/关闭/重启防火墙全球[VPS测评]
- 147SEO采集器 CSS选择器写法案例全球[VPS测评]
- RAKsmart:1核1GB/40GB空间/不限流量/15Mbps/KV虚拟空间(主机)
- 持续高温!长沙所有初中新生停止军训!全球[VPS测评]
- 极光KVM:新上香港CN2VPS,终身6折优惠,1核/1G/5Mbps,香港VPS[主机]
- 港网科技怎么样?国内BGP云主机,2核2G5M带宽仅377.46元/年全球[VPS测评]
- 香港云服务器的优势有哪些方面香港VPS[主机]
- cmivps:全场7折,香港不限流量VPS,Windows系统,LinuWINDOWS
- 快云科技:2核2G3M云服务器14.98元/月;香港vps全场7.5折,香港VPS[主机]
- wikihost,微基主机服务,100M带宽香港CMIVPS,5G防御,香港VPS[主机]
- Vultr新用户100美金 最新活动来啦!新用户充值活动来了,充100美全球[VPS测评]
- Weebly网站迁移到WordPress的实操上手。全球[VPS测评]
- Ubuntu关机命令是什么?Ubuntu关机命令介绍全球[VPS测评]
- 阁天互联怎么样?香港cn2云服务器 圣何塞cn2vps仅20/月香港VPS[主机]
- Ubuntu关机命令是什么?Ubuntu关机命令介绍全球[VPS测评]
- 硅云怎么样?硅云服务器好用吗?硅云香港vps多少钱一年?香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-246027.html











