快速云: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
- 易探云:香港BGP/CN2高防云服务器租用价格表 香港VPS[主机]
- 欧路云:美国特价云服务器/50M带宽8元/月起;香港云服务器月付15元起 美国VPS[主机]
- 如何设置必应api 自动推送网站 全球[VPS测评]
- Rustrot-深绿色UI电商网站模板HTML5框架 全球[VPS测评]
- 日主机,便宜美国CN2高防VPS¥19/月起,1Gbps带宽,香港多IP 站群服务器[IP]
- tudcloud,香港vps终身八折$7.76/月起,1核1G内存,香港 香港VPS[主机]
- 群英云怎么样?2核2G3M华北BGP云服务器,98元/首月;香港cn2v 香港VPS[主机]
- 月神云:洛杉矶CN2 GIA高防vps、香港CN2 GIA VPS全场7 香港VPS[主机]
- 景文互联年终特惠:日本/香港/美国VPS全场7折+送内存,充1000送3 日本VPS[主机]
- 初忆云:香港美国cn2云服务器30元;香港cn2高防vps30元,美国1 美国VPS[主机]
- 雪花云怎么样?雪花云香港云服务器1核1G2M仅19元/月 香港VPS[主机]
- 葫芦云:香港将军澳CN2云服务器24元/月,1核/1GB/25G硬盘/3 香港VPS[主机]
- HKserver:香港GIA VPS,1核/512MB/10GB空间/1 虚拟空间(主机)
- LOCVPS:全球云美国洛杉矶CN2 VPS,香港云地Xen VPS七折 美国VPS[主机]
- RangCloud:山东BGP NAT VPS,19元/首月,大带宽VP 香港VPS[主机]
- 奇异互动:香港2核4G5M云服务器仅83元/月,700元/年;裸金属服务 香港VPS[主机]
- 腾讯云香港服务器价格,腾讯云香港云主机多少钱一年? 香港VPS[主机]
- 特网云:香港高防云主机,香港/美国/韩国/大连/沈阳等地区,低至48元/ 韩国VPS[主机]
- 零云数据:辽宁BPG云服务器,19元/月起,防50G;香港CN2路线vp 香港VPS[主机]
- 恒创科技:海外全球大促,香港美国服务器,全场低至3折限量首购 美国VPS[主机]
- 吸血鬼崛起服务器怎么快速搭建? 全球[VPS测评]
- jquery css3实现的进度条动画特效,带加载进度条百分比动态效果。 全球[VPS测评]
- Weebly网站迁移到WordPress的实操上手。 全球[VPS测评]
- 阿里云服务器一年价格多少钱?阿里云服务器报价 全球[VPS测评]
- VPS成立BurjeelHoldings 全球[VPS测评]
- 播放量破千万,点赞量破百万,你绝对想不到这三款多功能产品居然在TK上卖爆 全球[VPS测评]
- VPS到底有什么用? 全球[VPS测评]
- 厘米云,江苏移动100G高防云服务器,4核4G内存20M带宽79元/月 全球[VPS测评]
- 阁天互联怎么样?香港cn2云服务器 圣何塞cn2vps仅20/月 香港VPS[主机]
- 野草云服务器怎么样?香港CN2+BGP带宽30M月付19元 香港VPS[主机]
转载请注明原文地址: http://140.238.13.167:12355/read-232065.html











