火车头采集器免登录采集数据发布到DEDECMS的方法

将dede/config.php中的下面代码:

  //检验用户登录状态       $cuserLogin = new userLogin();     if($cuserLogin->getUserID()==-1)     {         header("location:login.php?gotopage=".urlencode($dedeNowurl));         exit();     }

修改为:

 

  //检验用户登录状态  $cuserLogin = new userLogin();  if($cuserLogin->getUserID()==-1)  {  if($my_u != '')  {  $res = $cuserLogin->checkUser($my_u,$my_p);  if($res==1)  $cuserLogin->keepUser();  }  if($cuserLogin->getUserID()==-1)  {  header("location:login.php?gotopage=".urlencode($dedeNowurl));  exit();  }  }  

然后火车头发布模块修改为

article_add.php?my_u=你后台用户名&my_p=你后台密码

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容