外贸无界烟台市有多少跨境电商?烟台跨境电商开发平台,烟台跨境电商选品
【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |
首先如何获取必应的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
- Worria→$60 月-E3 1230v2 8GB 1TB 2IP 1日本VPS[主机]
- 双十一 RAKsmart→注册就有机会抽到一年免费服务器 100M 不限全球[VPS测评]
- 死海网络→199 元 月 8GB 内存 40GB SSD 空间 不限流量虚拟空间(主机)
- veesp→$1 月 KVM-512MB 10GB 100GB 圣彼得堡全球[VPS测评]
- Centos 复制文件夹内所有文件到另一个文件夹命令全球[VPS测评]
- WordPress 文章去重 删除 WordPress 重复文章的两种有全球[VPS测评]
- include_once 与 require_once 的区别全球[VPS测评]
- 国内看视频专用 死海网络→1 核 256M 5G SSD 100Mbps全球[VPS测评]
- 卫卫互联→香港 日本 韩国 国内等 CDN 有 DDOS 防护 30GB日本VPS[主机]
- 免费美国空间 微基主机→现有 VPS 客户可领取首年免费 100M 高速虚拟空间(主机)
- thinkphp5 在 phpstudy 下无法去掉 index.php全球[VPS测评]
- WordPress插件:Add-Document-Pages为你的网站增全球[VPS测评]
- VPSnet.com立陶宛便宜vps,€1.99起/月-基于Virtuo全球[VPS测评]
- 宝塔Linux面板7.5.1企业版破解开心版一键脚本全球[VPS测评]
- WordPress插件:IMGspider 一键抓取文章外链图片本地化全球[VPS测评]
- SoftShellWeb 黑五促销 中国台湾大陆优化线路 1g内存 带5全球[VPS测评]
- iniz 美国洛杉矶VPS测评记录 (3.5£)美国VPS[主机]
- HostXen:双十一新用户香港、日本vps,送20元代金券,充值300日本VPS[主机]
- 群英云怎么样?2核2G3M华北BGP云服务器,98元/首月;香港cn2v香港VPS[主机]
- 腾讯云轻量应用服务器128元/年,香港免备案vps/30M大带宽/100香港VPS[主机]
- 56云服务器怎么样?56云服务器价格和优势是什么?全球[VPS测评]
- 厘米云,江苏移动100G高防云服务器,4核4G内存20M带宽79元/月全球[VPS测评]
- 外贸无界烟台市有多少跨境电商?烟台跨境电商开发平台,烟台跨境电商选品全球[VPS测评]
- WordPress去掉分类链接中category目录的两种方法全球[VPS测评]
- 六六云:1核/1GB/20GB硬盘/500GB流量/30Mbps/KVM香港VPS[主机]
- 青云互联:年终特惠香港弹性云服务器15元/月起,可自定义配置,可选winWINDOWS
- 晚点独家丨拼多多9月上线跨境电商平台,首站美国美国VPS[主机]
- 磐逸云怎么样?香港沙田cn2vps 带宽5M年付128元香港VPS[主机]
- ERP库存管理系统HTML5模板 - DreamsPOS全球[VPS测评]
- 如何设置指定路径跳转指定域名?全球[VPS测评]
转载请注明原文地址:https://motoll.com/read-231939.html