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
- 看奈飞 99 元 月 1G 内存 10G 硬盘 1T 流量 300Mbp全球[VPS测评]
- PHP 判断是否为微信浏览器(微信客户端)的函数全球[VPS测评]
- Kuai Che Dao→$18.3 季 512MB 内存 10GB S虚拟空间(主机)
- 内地方向带宽不足-ABCloud→香港 NAT 1 核 512M 内存 香港VPS[主机]
- PHP→Cannot use object of type stdCla全球[VPS测评]
- tmhhost→安畅机房 cn2 gia vps 促销 强制三网回程 c全球[VPS测评]
- 可购数据盘 $3.5 月 1G 内存 20G 硬盘 1Gbps 不限量 全球[VPS测评]
- 疯狂猜成语 图猜成语一个龟字上面竖起大拇指一个鳖字是什么成语?全球[VPS测评]
- 搬瓦工最便宜的 cn2vps 补货,10Gbps 大带宽服务器,46.8全球[VPS测评]
- ONEVPS→$4 月 KVM-512MB 20G SSD 1G 无限流日本VPS[主机]
- 抢购 HostDare→亚洲优化线路 65 折优惠 1 核 756M 内全球[VPS测评]
- Hostiger-3.99$ 月 土耳其 美国堪萨斯 1核1G20G硬盘美国VPS[主机]
- 萌云英国伦敦GIA VPS 三网GIA 解锁流媒体全球[VPS测评]
- 缓解云计算人才焦渴,苏州工业园区用三年引得源头活水来全球[VPS测评]
- JGKVM促销,美国cn2vps服务器价格再创新低,平均6.5元/月起美国VPS[主机]
- 曾经最大跨境电商平台团队收缩,只剩20人丨GoingGlobal周报全球[VPS测评]
- 搬瓦工VPS:高端线路助力企业运营,10Gbps美国 cn2 gia,1日本VPS[主机]
- 腾讯云限时秒杀改版:轻量应用服务器2核4G8M仅598元/年,增香港/新香港VPS[主机]
- 极光KVM:新上香港CN2VPS,终身6折优惠,1核/1G/5Mbps,香港VPS[主机]
- 云服务器和服务器各有什么优缺点?全球[VPS测评]
- 企鹅小屋:深港IPLC节点,0.25元/G流量,不用不花钱全球[VPS测评]
- 硅云:香港免备案云服务器仅232元/年;香港2核2G2M仅482元/年香港VPS[主机]
- 快云科技:2核2G3M云服务器14.98元/月;香港vps全场7.5折,香港VPS[主机]
- SugarHosts,美国云服务器,洛杉矶cn2中美极速专线,香港建站服美国VPS[主机]
- 恒创科技:免备案香港/美国云服务器低至2.5折,仅需220元/年美国VPS[主机]
- 8K超高清记录中国空间站凌月:天和核心舱与问天实验舱组成“土”字结构虚拟空间(主机)
- 香港云服务器性价比高:香港云服务器哪家便宜香港VPS[主机]
- 桔子数据:1核/1G/50Mbps/洛杉矶CUVIP线路/首月14元;香香港VPS[主机]
- 港网科技怎么样?国内BGP云主机,2核2G5M带宽仅377.46元/年全球[VPS测评]
- 数据中心助力光纤光缆行业发展全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-246027.html











