六六云:1核1GB/15GB空间/1T流量/100Mbps/KVM/香港PCCW,50元/月
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 限时 腾讯云秒杀活动最后 3 天 诚信无套路 做站用户必选商家全球[VPS测评]
- 疯狂猜成语 图猜成语虚线写的地水火风四个字是什么成语?全球[VPS测评]
- 腾讯云秒杀→AMD 云服务器年付 88 元起 2C4G3M 年付 368全球[VPS测评]
- PuzCloud→38 元 月 1GB 内存 10GB 空间 500GB虚拟空间(主机)
- 用 js 提交表单而不是 submit 时怎么触发验证 jquery.v全球[VPS测评]
- 景文互联→日本服务器月付 900 元起 软银+CN2 线路 快速上架日本VPS[主机]
- 2019 年国内外 PT 站排名及邀请方式全球[VPS测评]
- 新商家 嘟牛云→香港 日本机房 VPS 全部 8 折优惠 年付仅需要 1日本VPS[主机]
- TmhHost→洛杉矶三网 CN2 GIA 线路季付 88 元起全球[VPS测评]
- 疯狂猜成语 图猜成语一片草和一个人被拦腰斩断是什么成语?全球[VPS测评]
- 增配通知 Vultr→不加价为 VPS 套餐增加 30%-220%的 S虚拟空间(主机)
- include_once 与 require_once 的区别全球[VPS测评]
- 通过给WordPress文章添加3篇假的页码导航实现相关文章全球[VPS测评]
- 博客写手怎么突破更新文章的困境全球[VPS测评]
- Google AMP 可以提升收录和排名吗?哪些网站适合使用AMP?哪些全球[VPS测评]
- 搬瓦工VPS传家宝10G KVM PROMO和SPECIAL 10G K全球[VPS测评]
- MoeCloud → 加拿大多伦多VPS 1C1G20G硬盘 5T流量@全球[VPS测评]
- 跨境电商有哪些平台?十大跨境电商平台!全球[VPS测评]
- 精美的宠物医院网站WordPress主题 - Valkuta全球[VPS测评]
- Linux chown -R 指令介绍与使用全球[VPS测评]
- 2022年黄河流域跨境电商博览会将于8月26日至28日在青岛西海岸新区举全球[VPS测评]
- 彗星云:香港特价vps1核/1G/无限流量/月付仅9元,年付仅75元;国香港VPS[主机]
- SEO和网页加载速度有关系吗?如何提升?全球[VPS测评]
- 磐逸云怎么样?1核1G香港安畅CN2 VPS带宽5M年付128元香港VPS[主机]
- 搬瓦工VPS:高端线路助力企业运营,10Gbps美国 cn2 gia,1日本VPS[主机]
- 港口雄开万里流丨不出国门海淘全球青岛跨境电商未来可期全球[VPS测评]
- 持续高温!长沙所有初中新生停止军训!全球[VPS测评]
- 一篇漫画,看懂云计算全球[VPS测评]
- 傲游主机:香港cn2高防云主机,159元/月/2核/2GB/40GB/2香港VPS[主机]
- 2021硅云新年献礼活动:香港企业级云服务器2核4G5M仅2888元/5香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-238901.html











