三优云uuuvps:春节促销,香港cn2 vps低至168元/年,多款配置/不限流量
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 便宜 $7.2 年 512M 内存 10G 硬盘 1T 流量 100Mb全球[VPS测评]
- VPS 上安装 Speedtest HTML5 服务来测带 报错” Pa全球[VPS测评]
- php 完美判断身份证号码是否有效(18 位)全球[VPS测评]
- Sharktech 五五折 2GB 30G SSD 4TB 洛杉矶(高防全球[VPS测评]
- Parse error: syntax error, unexpecte全球[VPS测评]
- Hetzner→€4.15 月 AMD EPYC 2GB 内存 40GB虚拟空间(主机)
- Centos 自定义脚本开机启动全球[VPS测评]
- 优惠 greencloudvps→全场 5 折优惠 1G 套餐低到$24日本VPS[主机]
- 内存偏小-NexusBytes→$3.25 月 500G 硬盘 5T 流全球[VPS测评]
- 国内稳定做站 腾讯云秒杀→1 核 2G 50G 1M 年付 99 元 2全球[VPS测评]
- WordPress插件:Compress JPEG & PNG imag全球[VPS测评]
- RackNerd洛杉矶高防VPS 1G内存/18G硬盘/1Gbps/60全球[VPS测评]
- WordPress主题:昼夜双版Panda Pro 主题 慎买,更新太慢全球[VPS测评]
- 解决Debian9系统环境中文乱码的问题 检查设置UTF-8编码全球[VPS测评]
- ottnec-hosting-2欧 月 德国 1核3GB内存40GB硬盘全球[VPS测评]
- 咸鱼云 → 圣何塞 联通回程 → 解锁Netflix → 1G内存 1全球[VPS测评]
- 适合美容院的正能量抖音文案,唯美阳光,正能量满满全球[VPS测评]
- 什么是云服务器?云服务器怎么登陆?全球[VPS测评]
- 什么是Bootstrap?全球[VPS测评]
- 从阿里云七代云服务器,谈云计算四大趋势全球[VPS测评]
- Mysql连接数过高,如何检查?全球[VPS测评]
- 瓜云互联怎么样?香港/美国洛杉矶CN2高防vps 50G月付34元美国VPS[主机]
- 华凯易佰同比扭亏跨境电商行业回暖H2旺季将至中报追踪全球[VPS测评]
- 菜单选中标记CSS3动画效果全球[VPS测评]
- 又一跨境电商产业园落户!中山石岐签约引进16个项目全球[VPS测评]
- 悦智网络:香港cn2 VPS阿里云线路,四川德阳高防vps,大连高防vp香港VPS[主机]
- 修罗云:1核/512MB/6GB空间/1TB流量/NAT/KVM/香港H虚拟空间(主机)
- Weebly网站迁移到WordPress的实操上手。全球[VPS测评]
- 2021恒创科技开年采购季:香港/美国云服务器低至299元/年美国VPS[主机]
- 快速云:云服务器和vps区别是什么云服务器和vps哪个比较安全2022-全球[VPS测评]
转载请注明原文地址:http://140.238.13.167:12355/read-244941.html











