快速云:vps云服务器的区别是什么?2022-08-1913:32来源:快速云网络
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 禁止 QQ 输入时自动转换表情的办法全球[VPS测评]
- php 判断是否为真实有效的身份证号码全球[VPS测评]
- tp5.1 怎么获取当前模块名 控制器名 方法名?全球[VPS测评]
- 预售 UOvZ→HK-CMI 预售版 1G 套餐年付$22.49 1G 全球[VPS测评]
- stsdust 广州移动 vds 预售,1Gbps 带宽无限流量,硬件资全球[VPS测评]
- NecoVM 宿迁移动大带宽 VPS 补货,共享 IP,G 口带宽接入,全球[VPS测评]
- DediPath 上线 1Gbps 端口不限流量 VPS 年付 20 美全球[VPS测评]
- Friendhosting→$1.75 起 首付 5 折 KVM 无限流全球[VPS测评]
- MoeCloud→香港 HKT KVM VPS 动态 IP 1Gbps 香港VPS[主机]
- 疯狂猜成语 图猜成语一根绳子上穿着一串写着恶字的金牌子是什么成语?全球[VPS测评]
- 真实测评 云创网络→1G 内存套餐测评数据 五一促销 年付 6 折优惠 全球[VPS测评]
- DMIT→$140 年 1GB 内存 10GB SSD 空间 1TB 流虚拟空间(主机)
- CAD清理注册表/CAD重装失败怎么办?AUTO Uninstaller全球[VPS测评]
- V5.NET 香港阿里云CN2专线 香港日本独服 4g内存240gssd日本VPS[主机]
- VPC.KR 韩国 IPLC NAT 评测韩国VPS[主机]
- 搬瓦工日本软银限量版 → 联通用户首选 → 512M 10G SSD 日本VPS[主机]
- 江苏高防服务器哪里买?宿迁BGP、宿迁双线高防服务器的价格全球[VPS测评]
- 香港云服务器怎么选?云服务器性能测评对比香港VPS[主机]
- 腾讯会议故障了 提示:会议发生异常请重新加入会议全球[VPS测评]
- jquery css3实现的进度条动画特效,带加载进度条百分比动态效果。全球[VPS测评]
- 2020畅行云双11活动:海内外云服务器超低1.5折,2核2G5M云主机全球[VPS测评]
- 20个温暖心灵的问题,抖音,朋友圈都可以拿去发。全球[VPS测评]
- 冀青云怎么样?香港CN2-GIA vps月28元/香港NTT 月9元香港VPS[主机]
- 春天的风最容易温暖心灵,适合朋友圈和抖音的12条文案全球[VPS测评]
- 傲闪云vps,1核1G低至10元起,国内高防/香港CN2/美国CN2/美美国VPS[主机]
- hostkvm怎么样?香港云vps 带宽30M 月付6美元香港VPS[主机]
- 修罗云:1核/512MB/6GB空间/1TB流量/NAT/KVM/香港H虚拟空间(主机)
- 六六云:香港BGP云服务器/80M大带宽,月付45元起,5折优惠码可用香港VPS[主机]
- 2020畅行云双11活动:海内外云服务器超低1.5折,2核2G5M云主机全球[VPS测评]
- 腾讯云轻量应用服务器128元/年,香港免备案vps/30M大带宽/100香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-232065.html











