GreenCloudVPS:5折、6折优惠,日本、新加坡、香港等KVM VPS、大盘鸡vps
【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |
首先如何获取必应的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
- 搬瓦工提示”Migration backend is currently全球[VPS测评]
- 腾讯云秒杀→1C2G50G2M 三年 680 元 2C4G50G6M 三全球[VPS测评]
- 疯狂猜成语 图猜成语偏字的人字旁画着红圈和斜线旁边还有一个奇字是什么成语全球[VPS测评]
- hkserversolution→台湾动态 VPS 随意切换 IP 7.全球[VPS测评]
- RAKsmart→日本站群服务器 50M 带宽 258IP 每月 241站群服务器[IP]
- HostKvm→$7.35 月 KVM-双核 4GB 30GB 1.5T美国VPS[主机]
- 手字下面有个天是什么成语?全球[VPS测评]
- 五月 RAKsmart 无视 cc 防御 100G 防御免费测试 E3-全球[VPS测评]
- 符码 CDN→香港节点 500GB 月流量 月付 1 元;800GB 月香港VPS[主机]
- 设置 select 某一项不可选 禁用 select 指定 option全球[VPS测评]
- 做站推荐 98 元 年 2 核 CPU 512M 内存 10G SSD 全球[VPS测评]
- 疯狂猜成语 图猜成语1+1=王是什么成语?全球[VPS测评]
- 什么是阿里云 ECS 服务器全球[VPS测评]
- 极光 KVM 双十一 美西 CN2 BGP 512M内存600G流量10全球[VPS测评]
- WordPress网站代码实现网站弹窗广告全球[VPS测评]
- DreamITHost → 5.9$ 月 1C2G50G硬盘 100Mb全球[VPS测评]
- owocloud-萌凛云上海cn2 nat vps 测评全球[VPS测评]
- 搬瓦工:美国香港cn2 gia线路VPS,10Gbps带宽,移动+联通企美国VPS[主机]
- 快云科技:2核2G3M香港云BGP/新界CN2云服务器,月付33元香港VPS[主机]
- 野草云vps怎么样?香港美国vps,1核1G3M带宽,38元/月美国VPS[主机]
- 无忧云,香港VPS全线5折促销,四川高防服务器/大连BGP/德阳高防/深香港VPS[主机]
- 阳帝云:香港大宽带vps仅15元/月;美国vps200G防御仅28元/月美国VPS[主机]
- 搬瓦工VPS:高端线路助力企业运营,10Gbps美国 cn2 gia,1日本VPS[主机]
- UCloud云服务器2020年度大促:北京/上海云服务器/香港免备案云服香港VPS[主机]
- 香港的云服务器值得租用吗?有什么好处?香港VPS[主机]
- KVMCloud:1核/512M/40G硬盘/无限流量/美国/香港BGP美国VPS[主机]
- 空空云怎么样?香港CN2-GIA VPS,带宽2M,月付15元香港VPS[主机]
- 什么是IconFont ?iconfont 的使用和解析全球[VPS测评]
- 八成企业看好出海投资 防止“溺水”需重视这一点全球[VPS测评]
- 咖啡主机:香港1G:15.6元/月(季付),美西1G:16.8元/月(季香港VPS[主机]
转载请注明原文地址:https://www.motoll.com/read-235749.html