YYYHost:4核4G香港cn2vps,20G SSD/3Mbps不限流量/KVM,月付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
- 疯狂猜成语 图猜成语一个美女和一滩水是什么成语?全球[VPS测评]
- uploadify-无刷新图片批量上传插件-.net 下批量上传图片并且全球[VPS测评]
- Krypt 新平台 KVM 月付 5 美元起 年付 5 折 洛杉矶 CN全球[VPS测评]
- Dedicated→$35 月 E3-1270 8GB 内存 1TB 硬全球[VPS测评]
- 来自 Discuz 的经典 php 加密&解密函数 AuthCode()全球[VPS测评]
- 促销 $25 年 2CPU 2G 内存 20G SSD 2.5T 流量 全球[VPS测评]
- 两个得字下面一个大的举字是什么成语?全球[VPS测评]
- TheStack→$7 月 KVM-4GB 60GB 2TB 洛杉矶全球[VPS测评]
- 腾讯云秒杀→上海北京云服务器年付 99 元起 1C2G50G2M 三年仅全球[VPS测评]
- WPS Office 2019 去掉广告的办法全球[VPS测评]
- Amazon CloudFront→香港 日本 韩国 台湾等 CDN 服日本VPS[主机]
- CMIVPS 新年优惠全站 VPS 年付 7 折全球[VPS测评]
- 如何解决WordPress后台登录显示重定向次数过多全球[VPS测评]
- AlphaVPS保加利亚商家 EPYC KVM VPS 1核2GB内存/全球[VPS测评]
- 如何处理 WordPress 网站 404 报错页面?全球[VPS测评]
- WordPress站内链接修改插件:Velvet Blues Updat全球[VPS测评]
- ConoHa 新加坡小鸡评测 不能看 Netflix全球[VPS测评]
- HTML5绿色有机食品电商网站模板 - Organtio全球[VPS测评]
- 磐逸云怎么样?CN2线路香港VPS月付20元香港VPS[主机]
- uuuvps:香港VPS低至97元/年,CN2+bgp网络,香港机房VP香港VPS[主机]
- 什么是云服务器?云服务器怎么登陆?全球[VPS测评]
- 无忧云,香港VPS全线5折促销,四川高防服务器/大连BGP/德阳高防/深香港VPS[主机]
- 实例 GIA0910629396 重启失败,原因:sudo: unabl全球[VPS测评]
- 辰迅云怎么样?国内香港云服务器全场5折,物理服务器限时特价香港VPS[主机]
- 跨境电商洋码头生死攸关:买手流失资金被冻结保全全球[VPS测评]
- 跨境电商周报丨拼多多布局跨境电商平台;Shopify将推出新平台支持网红全球[VPS测评]
- CIO和其他IT领导者充分利用边缘计算增强业务的4个关键全球[VPS测评]
- CubeCloud,香港cn2,美国cn2 gia线路vps主机,2核1美国VPS[主机]
- 性价比最高的VPS网络评测全球[VPS测评]
- 空空云怎么样?香港CN2-GIA VPS,带宽2M,月付15元香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-235163.html











