tmhhost:香港安畅机房三网CN2 GIA VPS,月付45起;美国GIA高防vps套餐,季付99元起
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- Virtono - 春季特价促销 VPS 最低二八折年付€9.95全球[VPS测评]
- TMThosting→西雅图高防 KVM 八折起 月付 3.16 美元起全球[VPS测评]
- PHP 判断字符串是否以指定字符(串)开头的方法全球[VPS测评]
- 极光 KVM→国庆促销 三网 CN2 GIA 包年 199.8 元 年 全球[VPS测评]
- Linux Centos 服务器带宽异常跑满的排查解决办法全球[VPS测评]
- 促销 sharktech 鲨鱼机房→VPS 全场 75 折 独立服务器 独立服务器[U]
- 大流量 VPS $4 月 512M 内存 20G SSD 10TB 流量全球[VPS测评]
- Vultr - 新增 High Frequency 高性能云服务器系列全球[VPS测评]
- Dell latitude 3450 怎么关闭触摸板(win7)全球[VPS测评]
- 疯狂猜成语 图猜成语一张弯曲的纸上写着打抱两个字是什么意思?全球[VPS测评]
- OneVPS→$3.75 月 512MB 内存 20GB SSD 空间 虚拟空间(主机)
- 用XAMPP搭建本地PHP测试环境及安装WordPress全球[VPS测评]
- WordPress博客固定链接是否会影响网站SEO?全球[VPS测评]
- AlphaVPS保加利亚商家 EPYC KVM VPS 1核2GB内存/全球[VPS测评]
- QuadraNet机房洛杉矶便宜服务器,E3处理器,30TB大流量, $全球[VPS测评]
- Vpsmmo247 → 5$ 月 1C1G 1Gbps不限流量 越南 新全球[VPS测评]
- 向日葵-漏洞科普:海外云服务器三种漏洞修复方法快收藏起来!全球[VPS测评]
- 什么是VPS?国内VPS有哪些?全球[VPS测评]
- 六一云:香港CMI VPS,10G防御,1核/1G/40G SSD/15香港VPS[主机]
- HostKvm:韩国香港vps10月份最新促销,海外VPS全场八折优惠韩国VPS[主机]
- 人们为啥不爱吃海底捞了?海底捞上半年亏损达2.97亿 网友神评扎心全球[VPS测评]
- HostHatch:1核/2GB/20GB空间/KVM/香港/洛杉矶/纽虚拟空间(主机)
- 为什么大家都选择香港服务器建站香港VPS[主机]
- 安国云:1核/1G/20G硬盘/1Mbp不限流量/香港cdia,月付18香港VPS[主机]
- 关键路径、资金情况、政策关键数据中心的可持续发展路径在哪里?全球[VPS测评]
- 亿速云双12年终回馈:云服务器2折活动,订单满100元减50元全球[VPS测评]
- 阿里云香港服务器多少钱一年?香港云服务器租用年付价格表香港VPS[主机]
- 香港云服务器性价比高:香港云服务器哪家便宜香港VPS[主机]
- 悦智网络:香港cn2 VPS阿里云线路,四川德阳高防vps,大连高防vp香港VPS[主机]
- 六六云:1核/1GB/20GB硬盘/500GB流量/30Mbps/KVM香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-243389.html











