$matchvar = jieqi_cmatchall($pregstr, $source); } if (empty($matchvar)) { jieqi_printfail($jieqiLang['article']['parse_articleid_failure']); } if (is_array($matchvar)) { $aidsary = $matchvar; } else { $aidsary = array(); } //下一页参数 $nextpageid = ''; if ($jieqiCollect['listcollect'][$_REQUEST['collectname']]['nextpageid'] == '++') { $nextpageid = intval($startpageid) + 1; } else { $pregstr = jieqi_collectstoe($jieqiCollect['listcollect'][$_REQUEST['collectname']]['nextpageid']); if (!empty($pregstr)) { $matchvar = jieqi_cmatchone($pregstr, $source); } if (!empty($matchvar)) { $nextpageid = trim(jieqi_textstr($matchvar)); } } //更新每一篇文章 include_once $jieqiModules['article']['path'] . '/class/article.php'; include_once $jieqiModules['article']['path'] . '/class/package.php'; $aid = 0; echo ' '; echo sprintf($jieqiLang['article']['page_collect_doing'], $jieqiCollect['sitename'], $jieqiCollect['listcollect'][$_REQUEST['collectname']]['title'], $_REQUEST['collectpagenum'], count($aidsary)); ob_flush(); flush();
$tmpstr = '$subchapterid = ' . $jieqiCollect['subchapterid'] . ';'; eval($tmpstr); $url = str_replace('<{subchapterid}>', $subchapterid, $url); } $chaptercontent = jieqi_urlcontents($url, $colary); if (!empty($colary['referer'])) { $colary['referer'] = $url; } if (!$chaptercontent) { $chaptercontent = ''; } } else { $chaptercontent = ''; } //分离章节内容 $pregstr = jieqi_collectstoe($jieqiCollect['content']); //echo strlen($chaptercontent); $matchvar = jieqi_cmatchone($pregstr, $chaptercontent); if (!empty($matchvar)) { $chaptercontent = $matchvar; //如果是文本地址或者js地址,则采集内容 if (strlen($chaptercontent) > 3 && strlen($chaptercontent) < 200) { $urlcontent = trim($chaptercontent); //看看是不是 script src="" 的代码 $matches = array(); preg_match('/\\<script[^\\<\\>]*src=(\'|")([^\\<\\>\'"]*)(\'|")[^\\<\\>]*\\>/is', $urlcontent, $matches); if (!empty($matches[2])) { $urlcontent = $matches[2]; } $tmpstr = strtolower(strrchr($urlcontent, '.')); if ($tmpstr == '.txt' || $tmpstr == '.js') {