Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[已答复] 关于supesite7采集器的刚采集就结束的修改方案

[复制链接]
lidq.jingwu 发表于 2009-6-3 20:27:19 | 显示全部楼层 |阅读模式
本帖最后由 lidq.jingwu 于 2009-7-3 09:26 编辑

在用SupeSite7采集信息的过程中会出现调试成功,但刚一采集就结束,采集不到任何内容的问题,现给出以下修改方案:
在supesite根目录下进入 admin 文件夹,找到admin_robots.php文件。
找到geturlfile函数:
  1. function geturlfile($url, $encode=1) {
  2.         global $thevalue, $_SCONFIG;

  3.         $text = '';
  4.         if(!empty($url)) {
  5.                 if(function_exists('file_get_contents')) {
  6.                         @$text = file_get_contents($url);
  7.                 } else {
  8.                         @$carr = file($url);
  9.                         if(!empty($carr) && is_array($carr)) {
  10.                                 $text = implode('',$carr);
  11.                         }
  12.                 }
  13.         }
  14.         $text = str_replace('·', '', $text);
  15.         if(!empty($thevalue['encode']) && $encode == 1) {
  16.                 if(function_exists('iconv')) {
  17.                         $text = iconv($thevalue['encode'], $_SCONFIG['charset'], $text);
  18.                 } else {
  19.                         $text = encodeconvert($thevalue['encode'], $text);
  20.                 }
  21.         }
  22.         return $text;
  23. }
复制代码
将此函数替换为:

  1. function geturlfile($url, $encode=1) {
  2.         global $thevalue, $_SCONFIG;

  3.         $text = '';
  4.         if(!empty($url)) {
  5.                 if(function_exists('file_get_contents')) {
  6.                         @$text = file_get_contents($url);
  7.                 } else {
  8.                         @$carr = file($url);
  9.                         if(!empty($carr) && is_array($carr)) {
  10.                                 $text = implode('',$carr);
  11.                         }
  12.                 }
  13.         }
  14.        
  15.         $text = str_replace('·', '', $text);
  16.         if(function_exists('iconv')) {
  17.                 $text = iconv($thevalue['encode'], $_SCONFIG['charset'].'//IGNORE', $text);
  18.         } else {
  19.                 $text = encodeconvert($thevalue['encode'], $text);
  20.         }
  21.         return $text;
  22. }
复制代码

评分

1

查看全部评分

小水鸡 发表于 2009-6-3 20:46:25 | 显示全部楼层
多谢了~~~~
回复

使用道具 举报

mekanor 发表于 2009-6-3 23:49:22 | 显示全部楼层
知道了
回复

使用道具 举报

chunge 发表于 2009-6-4 00:48:42 | 显示全部楼层
不错啊```   看一下```
回复

使用道具 举报

livesway 发表于 2009-6-4 18:07:00 | 显示全部楼层
没有使用采集!
回复

使用道具 举报

txd1110 发表于 2009-6-4 19:02:26 | 显示全部楼层
感谢。。。留个记号 遇到此情况时再来
回复

使用道具 举报

Gnagno 发表于 2009-6-4 20:25:42 | 显示全部楼层
谢谢呀
回复

使用道具 举报

228591898 发表于 2009-6-5 08:57:29 | 显示全部楼层
学习了 做个记号


















米秀时尚bbs.miixiu.com
回复

使用道具 举报

sunhai520 发表于 2009-6-5 10:55:10 | 显示全部楼层
还没有遇到这个问题 都采集成功的
回复

使用道具 举报

kuyoo 发表于 2009-6-5 11:42:13 | 显示全部楼层
学习了,收藏
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-29 23:54 , Processed in 0.114869 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表