六六云:1核/1GB/20GB硬盘/500GB流量/30Mbps/KVM/香港CMI VPS,40元/月
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 101 元 月 2 核 CPU 2G 内存 20G SSD 5T 流量 全球[VPS测评]
- AuroraCloud→40 元 月 1GB 内存 30GB 空间 2T虚拟空间(主机)
- 有点烂-Virtono→€14.95 年 1T 流量 罗马尼亚 德国 美美国VPS[主机]
- Bootstrap fileinput 插件实现批量上传一次请求的办法全球[VPS测评]
- 腾讯云秒杀→1499 元 3 年-双核 4G 内存 50G 硬盘 6M 全球[VPS测评]
- Xshell Xftp XshellPlus 5 和 6 版本官方下载+全球[VPS测评]
- 腾讯云秒杀→上海北京云服务器年付 99 元起 1C2G50G2M 三年仅全球[VPS测评]
- PHP 获取本周所有日期 PHP 获取当前时间所在周七天具体日期全球[VPS测评]
- 基于CentOS系统的VPS安全设置与优化全球[VPS测评]
- 华纳云 香港CN2GIA线路 1G内存50G硬盘2M小带宽半年付280元香港VPS[主机]
- Hostodo美国便宜VPS,3G内存/30GB NVMe/年付45美元美国VPS[主机]
- Parkinhost俄罗斯抗诉VPS六折促销,KVM架构,无视版权,不限全球[VPS测评]
- [谨慎]Tsukearu → 年付半价免初装费的日本小鸡 → 年付 ¥3日本VPS[主机]
- 狗云 → 韩国BGP → 8折 → 512M 10G SSD 500G韩国VPS[主机]
- HostDoc 1核心 3G内存 30G SSD 60G HDD 1T流美国VPS[主机]
- 人力资源管理系统前端Web模板 - SmartHR全球[VPS测评]
- 手帕云,便宜小带宽香港CN2 VPS,集群10G防御,双向CN2直连,仅香港VPS[主机]
- Ubuntu关机命令是什么?Ubuntu关机命令介绍全球[VPS测评]
- 搬瓦工:美国香港cn2 gia线路VPS,10Gbps带宽,移动+联通企美国VPS[主机]
- 漂亮的Css3响应侧边栏菜单,动画风格侧边栏导航菜单样式全球[VPS测评]
- 麻花云双12年终盛典:香港云主机9元起,老客户续费6折;安徽BGP线路v香港VPS[主机]
- 漂亮的Css3响应侧边栏菜单,动画风格侧边栏导航菜单样式全球[VPS测评]
- 租用美国服务器有哪些安全方案美国VPS[主机]
- 双翼鸟数据:香港cn2云服务器低至28元/月起;美国高防vps仅56元/美国VPS[主机]
- 阿里云共享型s6云服务器有没有香港服务器优惠?香港VPS[主机]
- OneTechCloud易科云双十二优惠:香港/美国CN2全场VPS季付美国VPS[主机]
- 孤狼云:香港沙田CN2/安畅CN2云服务器仅9.9元/月_香港虚拟主机2香港VPS[主机]
- 狸猫云:香港高速CN2VPS,200元/年-香港高速GIA云服务器促销活香港VPS[主机]
- GigsGigsCloud:2核/4GB/50G空间/1TB流量/10M虚拟空间(主机)
- WordPress网站更改后台登录地址图文教程全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-239715.html











