戈登云VPS,6折,充值送50%,香港cn2,美国cn云服务器,2核2G仅468元/年起
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- CloudCone→洛杉矶 KVM 年费 12.5 美元起 按小时计费随全球[VPS测评]
- HKServerSolution 台湾高性能 VDS 七折促销,三网 H全球[VPS测评]
- 腾讯云年末有礼→国内云服务器 1C2G1M 年付 128 元 2C4G6全球[VPS测评]
- 绝版补货 搬瓦工双向 CN2 GIA 线路 37.79 美元每年补货了全球[VPS测评]
- [ 黑五]PacificRack→$18.95 年 KVM-1GB 30全球[VPS测评]
- 真实测评 IMIDC→香港&台湾 CN2 服务器每月 50 美元 全场 香港VPS[主机]
- ajax post 返回网页源码的原因全球[VPS测评]
- WordPress网站引入腾讯vConsole调试面板方便手机端页面调试全球[VPS测评]
- V5.NET 香港阿里云CN2专线 香港日本独服 4g内存240gssd日本VPS[主机]
- 如何用PHPStudy搭建本地PHP测试环境及安装Wordpress全球[VPS测评]
- 百度网盘开源高速下载神器 :BaiduCDP全球[VPS测评]
- CentOS/Fedora/Ubuntu/Debian 一键安装 wge全球[VPS测评]
- Silicom美国便宜 cPanel 虚拟主机,$3起/年;VPS主机,美国VPS[主机]
- 1strentalserver-日本福冈-500日元 月原生IPvps-日本VPS[主机]
- VPS到底有什么用?全球[VPS测评]
- 做跨境电商一个月都有多少收入?全球[VPS测评]
- 数据中心助力光纤光缆行业发展全球[VPS测评]
- 自适应bootstrap左侧导航可关闭全球[VPS测评]
- 冀青云怎么样?香港CN2-GIA vps月28元/香港NTT 月9元香港VPS[主机]
- 江苏高防服务器哪里买?宿迁BGP、宿迁双线高防服务器的价格全球[VPS测评]
- 如何设置指定路径跳转指定域名?全球[VPS测评]
- 景文互联年终特惠:日本/香港/美国VPS全场7折+送内存,充1000送3日本VPS[主机]
- 轻云互联,香港美国vps终身8.8折17元/月起,cn2直连线路,50G美国VPS[主机]
- CentOS 7.x 系统安装和配置redis-7.0.4集群全球[VPS测评]
- asiacloud怎么样?香港云服务器(cn2 gia),6折优惠,1GWINDOWS
- 青果云怎么样?美国/香港/日本云主机 买多久送多久日本VPS[主机]
- diyvm:香港vps/美国vps/日本vps/2核/2G内存/5M带宽日本VPS[主机]
- 香港服务器租用哪里有?便宜的香港服务器租用香港VPS[主机]
- 数字化东风已来,亚马逊云科技跨境电商合作企业招募大会即将开启全球[VPS测评]
- 咖啡主机:元旦活动全场7、8折,洛杉矶vps仅需16元/月,香港将军澳C香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-233031.html











