阁天互联怎么样?香港cn2云服务器 圣何塞cn2vps仅20/月
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- Sharktech 五五折 2GB 30G SSD 4TB 洛杉矶(高防全球[VPS测评]
- 存储型 VPS $2 月 512M 内存 11G NVMe+256G 空虚拟空间(主机)
- QQ 空间被封怎么办?QQ 空间被封如何填写申诉解封?虚拟空间(主机)
- 按时计费 $2.8 月 512M 内存 10G 硬盘 1T 流量@1Gb全球[VPS测评]
- 阿里云建站首选轻量应用服务器 香港节点 30M 峰值带宽¥864 3 年香港VPS[主机]
- raksmart→日本不限流量服务器(物理机) 100Mbps 带宽 $站群服务器[IP]
- 稳定 搬瓦工 DC6 机房 CN2 GIA 线路 512M 套餐 年付 全球[VPS测评]
- Friendhosting→$1.75 起 首付 5 折 KVM 无限流全球[VPS测评]
- 便宜 bigfootservers→10.75 美元 月 可以购买 15全球[VPS测评]
- 腾讯云新春礼包(新老用户均可领取) 新用户秒杀最低 128 元起全球[VPS测评]
- TheStack→$42.5 月 2*L5630 24GB 内存 2TB全球[VPS测评]
- 如何通过巧用WordPress Trackbacks和Pingbacks全球[VPS测评]
- 如何在 CentOS 7 服务器上使用 yum命令安装 PHP7.2全球[VPS测评]
- WordPress删除文章时怎么才能删除缩略图及图片附件全球[VPS测评]
- 如何在 CentOS 7 服务器上使用 yum命令安装 PHP7.2全球[VPS测评]
- HostPost → 4.8$ 月 匈牙利 2C2G20G硬盘 10Gb全球[VPS测评]
- Jetorbit-印尼雅加达VPS 10$ 月 1C1G25G硬盘 百兆全球[VPS测评]
- 40火伞高压电爬坡更让企业用电于民全球[VPS测评]
- 九零云怎么样?香港将军澳VPS,美国圣何塞VPS 2核1G10M 47/美国VPS[主机]
- 紫云服务器怎么样?紫云香港云服务器1核1G2M仅65元/月香港VPS[主机]
- 青叶云怎么样?青叶云国内/国外弹性云服务器价格,海外vps低至25.6元全球[VPS测评]
- UCloud香港云主机怎么样?UCloud香港云主机1核1G1M评测香港VPS[主机]
- CubeCloud,香港cn2,美国cn2 gia线路vps主机,2核1美国VPS[主机]
- 金斗云怎么样?香港CN2月付23元,圣何塞CN2月付22元香港VPS[主机]
- tudcloud,香港vps终身八折$7.76/月起,1核1G内存,香港香港VPS[主机]
- 桔子数据,香港安畅BGP大带宽VPS 首月五折体验 三网直连 14元/月香港VPS[主机]
- 易科云:香港cn2 vps,洛杉矶 cn2云主机;全场月付9折/季付8折香港VPS[主机]
- 德斯拉科技:香港物理机900元/月,香港VPS/E5CPU,88元起,美美国VPS[主机]
- Vultr新用户100美金 最新活动来啦!新用户充值活动来了,充100美全球[VPS测评]
- 阳帝云:香港CN2 GIA云服务器,高配CPU/八折促销/稳定/可跑满香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-233649.html











