众创逸云:香港安畅CN2VPS全新上架,新用户首月5折优惠年付8折优惠(附测试报告)
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- 禁止 layer.msg()在回调时抖动全球[VPS测评]
- ThinkPHP5 提示→Cannot declare class be全球[VPS测评]
- 疯狂猜成语 图猜成语一个人气喘吁吁的在说话是什么成语?全球[VPS测评]
- CloudCone 便宜按小时计费美国 vps 低至$13 年,月付才 美国VPS[主机]
- 热网互联→美国 日本 香港 CN2 GIA 线路 注册领 40 元 香港日本VPS[主机]
- bacloud→€33.33 月 e3-1230v2 8G 内存 2*1全球[VPS测评]
- 疯狂猜成语 图猜成语一个人对着墙说了很多话墙破了一个洞是什么成语?全球[VPS测评]
- Hosteons→KVM 八折 OpenVZ 年付五折 不限流量 免费升全球[VPS测评]
- 傲游主机新上自助换 IP KVM 香港&日本&美国&德国多机房 75 折日本VPS[主机]
- Win7 系统 IIS 运行 asp 网站提示→ActiveX 部件不能全球[VPS测评]
- win7 修改 iis7 默认端口号方法 win7 系统如何修改 iis全球[VPS测评]
- AuroraCloud→240 元 月 1GB 内存 30GB SSD 虚拟空间(主机)
- 如何正确使用搬瓦工VPS主机全球[VPS测评]
- WordPress代码实现自动为文章中的图片添加alt、title属性全球[VPS测评]
- WordPress隐藏后台登录地址的最简单方法全球[VPS测评]
- gohost-哈萨克斯坦 1c10gb 100Mbps不限流量 8.9$全球[VPS测评]
- 如何设置指定路径跳转指定域名?全球[VPS测评]
- 为什么要拥有一台VPS?全球[VPS测评]
- 快速云:云服务器vps的区别是什么云服务器和vps哪个比较好2022-0全球[VPS测评]
- 播放量破千万,点赞量破百万,你绝对想不到这三款多功能产品居然在TK上卖爆全球[VPS测评]
- 七安云怎么样?香港CN2+BGP线路VPS 1核1G10M 16/月香港VPS[主机]
- anyhk香港HKT商宽NAT VPS,1Gbps无限流量,终身8折¥3香港VPS[主机]
- 二三互联年末回馈:香港/美国云服务器新购特价促销,优惠码可打76折美国VPS[主机]
- 麻花云:香港CN2VPS月付19元起,安徽移动8核/16G/20M独服2香港VPS[主机]
- 六六云:1核1GB/15GB空间/1T流量/100Mbps/KVM/香港虚拟空间(主机)
- HostHatch:1核/2GB/20GB空间/KVM/香港/洛杉矶/纽虚拟空间(主机)
- 什么是云计算?全球[VPS测评]
- 彗星云:香港特价vps1核/1G/无限流量/月付仅9元,年付仅75元;国香港VPS[主机]
- 野草云vps怎么样?香港美国vps,1核1G3M带宽,38元/月美国VPS[主机]
- 阳帝云:3月优惠活动,香港GIA/香港TG/洛杉矶200G硬防vps,首香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-247749.html











