edgeNAT双十二:韩国VPS/美国CN2/香港CN2VPS主机,月付7折年付6折
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 双十一 Losangelesvps→1 核 2G 内存 40G SSD 全球[VPS测评]
- 襄阳电信高防→8 核 8GB 100GB 20M(100G 防御)=30全球[VPS测评]
- notepad++设置中文 notepad++如何设置简体中文界面全球[VPS测评]
- Table 'XXX' is marked as crashed and全球[VPS测评]
- KMS 激活 Windows OfficeWINDOWS
- HKhoster→$69 月 1GB 内存 30GB 空间 不限流量 1虚拟空间(主机)
- TmhHost→安畅机房 CN2 GIA 线路补货 新上韩国 CN2 线韩国VPS[主机]
- 2020 腾讯云产品采购季有奖问卷调查,认真填写送腾讯云代金券奖励全球[VPS测评]
- 促销 $36 年 512M 内存 20G 硬盘 1Gbps 不限流量 K全球[VPS测评]
- HKServerSolution→999 元 月 E3-1230v3 1全球[VPS测评]
- IOFLOOD→$79 月-E3 1230v2 16GB 2x512G 全球[VPS测评]
- Windows 系统 远程桌面 漏洞公告 及如何安装安全补丁WINDOWS
- 真实测评 桔子数据→洛杉矶 CN2 GIA 1 核 1G 20G 硬盘 全球[VPS测评]
- WordPress主题:昼夜双版Panda Pro 主题 慎买,更新太慢全球[VPS测评]
- 搬瓦工VPS补货DC9 CN2 GIA限量促销年付39.99美金套餐全球[VPS测评]
- tmhhost 开学季促销 日本软银线路、洛杉矶三网cn2 gia 线路日本VPS[主机]
- 推荐! Virmach → 1C 512M RAM 15G SSD 25全球[VPS测评]
- 自适应bootstrap左侧导航可关闭全球[VPS测评]
- 40火伞高压电爬坡更让企业用电于民全球[VPS测评]
- 企鹅小屋:香港ntt vps,大带宽直连,1核/1G/2T流量/半年15香港VPS[主机]
- 阿里云服务器一年价格多少钱?阿里云服务器报价全球[VPS测评]
- 磐逸云怎么样?CN2线路香港VPS月付20元香港VPS[主机]
- 磐逸云:全场8折优惠,1核1G香港套餐月付24元,日本NNT线路套餐,月日本VPS[主机]
- 为什么要拥有一台VPS?全球[VPS测评]
- 六六云:1核1GB/15GB空间/1T流量/100Mbps/KVM/香港虚拟空间(主机)
- 麻花云怎么样?安徽移动VPS月付29元 香港VPS 2M月付21元香港VPS[主机]
- 阿里云香港服务器多少钱一年?阿里云香港云服务器如何购买?香港VPS[主机]
- 桔子数据,香港安畅BGP大带宽VPS 首月五折体验 三网直连 14元/月香港VPS[主机]
- 香港服务器租用哪里有?便宜的香港服务器租用香港VPS[主机]
- locvps:香港cn2vps(葵湾机房),2核2G40g硬盘,8折优惠WINDOWS
转载请注明原文地址:http://140.238.13.167:12355/read-237757.html











