做跨境电商,如何打造私域流量?
![]() | ![]() | ![]() | ![]() |
| 【性价之王】 | 【线路之王】 | 【价格之王】 | 【配置之王】 |
| 【免费之王】 | 【香港首推】 | 【梯子之王】 | 【独服之王】 |

首先如何获取必应的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
- Virmach 黑五闪购套餐更新,超优惠 请不停刷新本页面全球[VPS测评]
- 教程 宝塔面板搭建妹子图片站 自带爬虫采集 94imm 程序全球[VPS测评]
- 抽奖 Dogyun 喜迎庚子年抽奖活动→余额红包 2 折优惠码 流量包 全球[VPS测评]
- 宝塔面板回收站位置 宝塔面板回收站在哪里全球[VPS测评]
- 腾讯云秒杀→1C2G50G2M 三年 680 元 2C4G50G6M 三全球[VPS测评]
- 腾讯云 - 云服务器精选秒杀 1 核 2G2M 三年付 680 元全球[VPS测评]
- php 生成服务器信息函数全球[VPS测评]
- 双十二 HostXen→充 300 元送 50 元 购买(续费)2 个日本VPS[主机]
- 便宜 ¥399 2 年 2 核 CPU 2G 内存 20G SSD 30香港VPS[主机]
- ¥999 年 8 核 CPU 5G 内存 50G 硬盘 10M 带宽不限全球[VPS测评]
- 索罗金→每天签到最少赚 0.3 元现金 秒到微信零钱!全球[VPS测评]
- 搬瓦工又一次关闭免费更换IP服务全球[VPS测评]
- 全世界最便宜的域名注册商 Porkbun .com 域名首年付4.15刀全球[VPS测评]
- 更换收费 SSL 和 DNSPOD国际版收费服务全球[VPS测评]
- 美国知名 VPS 商家 linode 现在支持 PayPal 和 Goo美国VPS[主机]
- Hosthatch黑五促销Nvme高性能VPS两年付34美元起;HDD大全球[VPS测评]
- 2020黑五 GreenCloudVPS → 新加坡 日本机型 → 日本VPS[主机]
- 漂亮的Css3响应侧边栏菜单,动画风格侧边栏导航菜单样式全球[VPS测评]
- 全球云lovps,香港CN2线路vps 新品七折月付49元香港VPS[主机]
- 印象云怎么样?85折香港安畅CN2vps带宽3M月付23元香港VPS[主机]
- 搬瓦工:美国香港cn2 gia线路VPS,10Gbps带宽,移动+联通企美国VPS[主机]
- 九零云怎么样?香港将军澳VPS,美国圣何塞VPS 2核1G10M 47/美国VPS[主机]
- 30个美容院抖音唯美文案,看到就直接拿去发吧全球[VPS测评]
- 阿里云香港服务器价格优惠:老用户香港2核4G3M云服务器仅1181.5元香港VPS[主机]
- 葫芦云:香港将军澳CN2云服务器24元/月,1核/1GB/25G硬盘/3香港VPS[主机]
- 跨境贸易和跨境电商的三大区别简单分析全球[VPS测评]
- 数据中心助力光纤光缆行业发展全球[VPS测评]
- edgeNAT:全场6折优惠,韩国CN2、美国CN2、香港CN2月付36韩国VPS[主机]
- Aoyohost:1核1GB/20GB/600GB流量/60Mbps端口香港VPS[主机]
- 购买香港服务器需要做哪些准备香港VPS[主机]
转载请注明原文地址:http://140.238.13.167:12355/read-232669.html











