傲游主机:香港cn2高防云主机,159元/月/2核/2GB/40GB/200GB流量/DDOS/KVM
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 双十一 恒创科技→香港高防云服务器 4 折起 充值立返 10% CN2 香港VPS[主机]
- 优惠 80VPS→香港 Cera 机房 直连内地 5 折优惠 2 核 2香港VPS[主机]
- Navicat 导入 mysql 提示 Err 2006-MySQL s全球[VPS测评]
- kvmla 折上折促销,香港 日本 新加坡,vps8 折+充 500 送独立服务器[U]
- Pyclouds→45 元 月 256MB 内存 5GB 空间 100G虚拟空间(主机)
- 补货 CloudCone→512M 内存套餐 20 美元每年的套餐又补货全球[VPS测评]
- HTML 中正确设置表格 table 边框 border 的三种办法全球[VPS测评]
- 织梦 CMS 怎么在首页模板和列表页模板调用图集里的所有图片全球[VPS测评]
- 疯狂猜成语 图猜成语一颗心流出很多血是什么成语?全球[VPS测评]
- 葫芦主机→50 元 月 512MB 内存 20GB SSD 空间 500虚拟空间(主机)
- 2019 年 2 月 Vultr 最新促销活动整理 新注册用户完成首充最全球[VPS测评]
- 在宝塔面板安装WordPress如何设置伪静解决404页面全球[VPS测评]
- StockVPS 纽约机房 512m内存15g硬盘500g流量100m带全球[VPS测评]
- DMIT 洛杉矶 Cloudflare 高防 CN2GIA 线路 LAX全球[VPS测评]
- 云服务器能干什么?有几十种玩法?阿里云,腾讯云服务器如何购买?全球[VPS测评]
- 买了一台云服务器到底能干什么?全球[VPS测评]
- 如何设置必应api 自动推送网站全球[VPS测评]
- Fatal error: Allowed memory size of 全球[VPS测评]
- 极光kvm怎么样,便宜大带宽香港cmi vps/美国gia vps低至1美国VPS[主机]
- Rustrot-深绿色UI电商网站模板HTML5框架全球[VPS测评]
- 品光网络怎么样?香港美国服务器/云/高防,开年采购3.5折起美国VPS[主机]
- WHMCS 8.1如何简化注册页面全球[VPS测评]
- sugarhosts:虚拟主机3折(有独立IP),云服务器5折,香港\\独立服务器[U]
- vpsplayer:新年活动_vps全部7.5折起_深圳BGP/美西Ce香港VPS[主机]
- 桔子数据,香港安畅BGP大带宽VPS 首月五折体验 三网直连 14元/月香港VPS[主机]
- 游戏服务器是什么意思?游戏服务器可以用云服务器吗?全球[VPS测评]
- Ubuntu关机命令是什么?Ubuntu关机命令介绍全球[VPS测评]
- 麻花云怎么样?安徽移动VPS月付29元 香港VPS 2M月付21元香港VPS[主机]
- 持续高温!长沙所有初中新生停止军训!全球[VPS测评]
- 特网云:香港云服务器新上线,香港新界机房;1核/1G/5M宽带/50G硬香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-240569.html











