织梦百度收录查询插件说明
1.支持gbk和utf8编码2种程序
2.支持分批查询收录情况,无畏大量文章数据
3.支持指定栏目查询收录情况
4.支持关键字查询收录情况
5.支持1个或多个文档查询
6.支持提交链接给百度和熊掌号(天级和周级)
7、支持查询指定时间段文档查询并一键推送百度
8、注意:PHP必须开启了curl扩展
插件1.0视频演示:
插件2.0视频演示
插件2.0更新日志
1、增加熊掌号天级及熊掌号周级推送 2019.10.14
2、增加时间查询输出全部文章,可以一键推送百度 2019.10.14
3、插件集成自动添加推送接口变量无须手动添加 2019.10.14
插件截图:
插件安装说明
根据自己的网站编码选择对应的编码模块,网站后台-模块-上传新模块,安装,使用。
织梦百度主动推送设置教程
1、登录你的百度平台 https://ziyuan.baidu.com 获取接口调用地址
如图,注意你的站点域名要对应上
织梦熊掌主动推送教程
1、登录你的百度平台 https://ziyuan.baidu.com/ydzq/ 获取接口调用地址
如图,天级收录和周级收录都可以
注意你的站点域名已绑定上熊掌id
需要批量推送未收录的,这里要修改下
1、打开 /dede(后台目录)/inc/inc_archives_functions.php 在文件最末尾插入
/** * 百度主动推送 */ function baidu_push($id="",$qstr="") { global $cfg_multi_site,$cfg_basehost,$cfg_baidu_push; if(!empty($id) && !empty($cfg_baidu_push)) { if( !empty($id) && empty($qstr) ) $qstr = $id; if($qstr=='') { exit(); } $qstrs = explode('`',$qstr); $cfg_domain = $cfg_multi_site == 'N' ? $cfg_basehost : ''; $urls = array(); $i = 0; foreach($qstrs as $aid) { $i++; $arcrow = GetOneArchive($aid); $url = $cfg_domain.$arcrow['arcurl']; $urls[] = $url; $artlist .= $url."<br />"; } if($i>1) $artlist = ""; if(!empty($urls)){ $ch = curl_init(); $options = array( CURLOPT_URL => trim($cfg_baidu_push), CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => implode("\n", $urls), CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); curl_close($ch); $result = json_decode($result, true); if(isset($result['success'])){ $not_same_site = isset($result['not_same_site'][0]) ? " <font style='color:#f00;'>推送链接与百度绑定站点不一致</font> " : ""; $not_valid = isset($result['not_valid'][0]) ? " <font style='color:#f00;'>推送链接不合法</font> " : ""; return $not_same_site . $not_valid . '百度主动推送成功 '.$result['success'].' 条!当天剩余 '.$result['remain'].' 条可推送!'.$artlist; }else{ return '百度主动推送失败,错误码:'.$result['error'].'<a href="https://ziyuan.baidu.com/college/courseinfo?id=267&page=2#h2_article_title12" target="_blank">详情</a>'; } } return "没有数据被推送!"; } } /** * 熊掌周级主动推送 */ function xiong_push($id="",$qstr="") { global $cfg_multi_site,$cfg_basehost,$cfg_xiong_push; if(!empty($id) && !empty($cfg_xiong_push)) { if( !empty($id) && empty($qstr) ) $qstr = $id; if($qstr=='') { exit(); } $qstrs = explode('`',$qstr); $cfg_domain = $cfg_multi_site == 'N' ? $cfg_basehost : ''; $urls = array(); $i = 0; foreach($qstrs as $aid) { $i++; $arcrow = GetOneArchive($aid); $url = $cfg_domain.$arcrow['arcurl']; $urls[] = $url; $artlist .= $url."<br />"; } if($i>1) $artlist = ""; if(!empty($urls)){ $ch = curl_init(); $options = array( CURLOPT_URL => trim($cfg_xiong_push), CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => implode("\n", $urls), CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); curl_close($ch); $result = json_decode($result, true); if(isset($result['error'])){ return '熊掌主动推送失败,错误码:'.$result['error'].' message:'.$result['message']; }else{ $not_same_site = isset($result['not_same_site'][0]) ? " <font style='color:#f00;'>推送链接与熊掌绑定站点不一致</font> " : ""; $not_valid = isset($result['not_valid'][0]) ? " <font style='color:#f00;'>推送链接不合法</font> " : ""; return $not_same_site . $not_valid . '熊掌主动推送成功 '.$result['success_batch'].$result['success_realtime'].' 条!当天剩余 '.$result['remain_batch'].$result['remain_realtime'].' 条可推送!'.$artlist; } } return "没有数据被推送!"; } } /** * 熊掌天级主动推送 */ function xiong_day_push($id="",$qstr="") { global $cfg_multi_site,$cfg_basehost,$cfg_xiong_day_push; if(!empty($id) && !empty($cfg_xiong_day_push)) { if( !empty($id) && empty($qstr) ) $qstr = $id; if($qstr=='') { exit(); } $qstrs = explode('`',$qstr); $cfg_domain = $cfg_multi_site == 'N' ? $cfg_basehost : ''; $urls = array(); $i = 0; foreach($qstrs as $aid) { $i++; $arcrow = GetOneArchive($aid); $url = $cfg_domain.$arcrow['arcurl']; $urls[] = $url; $artlist .= $url."<br />"; } if($i>1) $artlist = ""; if(!empty($urls)){ $ch = curl_init(); $options = array( CURLOPT_URL => trim($cfg_xiong_day_push), CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_POSTFIELDS => implode("\n", $urls), CURLOPT_HTTPHEADER => array('Content-Type: text/plain'), ); curl_setopt_array($ch, $options); $result = curl_exec($ch); curl_close($ch); $result = json_decode($result, true); if(isset($result['error'])){ return '熊掌主动推送失败,错误码:'.$result['error'].' message:'.$result['message']; }else{ $not_same_site = isset($result['not_same_site'][0]) ? " <font style='color:#f00;'>推送链接与熊掌绑定站点不一致</font> " : ""; $not_valid = isset($result['not_valid'][0]) ? " <font style='color:#f00;'>推送链接不合法</font> " : ""; return $not_same_site . $not_valid . '熊掌主动推送成功 '.$result['success_batch'].$result['success_realtime'].' 条!当天剩余 '.$result['remain_batch'].$result['remain_realtime'].' 条可推送!'.$artlist; } } return "没有数据被推送!"; } }
2、打开 织梦后台目录/dede/archives_do.php 找到末尾一行的
?>
在它上面加入
else if($dopost=='baidu_push') { if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg('参数无效!',$ENV_GOBACK_URL); exit(); } require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); $result = baidu_push($qstr); ShowMsg($result,$ENV_GOBACK_URL,0,5000); exit(); } else if($dopost=='xiong_push') { if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg('参数无效!',$ENV_GOBACK_URL); exit(); } require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); $result = xiong_push($qstr); ShowMsg($result,$ENV_GOBACK_URL,0,5000); exit(); } else if($dopost=='xiong_day_push') { if( !empty($aid) && empty($qstr) ) $qstr = $aid; if($qstr=='') { ShowMsg('参数无效!',$ENV_GOBACK_URL); exit(); } require_once(DEDEADMIN.'/inc/inc_archives_functions.php'); $result = xiong_day_push($qstr); ShowMsg($result,$ENV_GOBACK_URL,0,5000); exit(); }
插件下载地址:
链接: https://pan.baidu.com/s/1-P4rVVtpZwyswb47YbM2Hg
提取码:咨询本站站长QQ:862782808(点击QQ号即可直接咨询)获得
插件下载说明
未提供下载提取码的插件,都是站长辛苦开发,联系客服或站长有偿获得!
织梦二次开发QQ群
本站客服QQ号:862782808(点击左边QQ号交流),群号(383578617) 如果您有任何织梦问题,请把问题发到群里,阁主将为您写解决教程!
转载请注明: 织梦模板 » 织梦百度收录查询及批量推送未收录插件