コード例 #1
0
ファイル: c_server.php プロジェクト: poi5305/ptnovel
 public function updateBookList($fromPage = 1)
 {
     $page = $fromPage;
     $maxPage = 0;
     do {
         $html = PtHttpCk101::getBookListPage($page);
         $bookList = PtParserCk101::parseBooksFromForum($html);
         $maxPage = max($maxPage, PtParserCk101::parseForumPages($html));
         $this->d("parsing forum page {$page}/{$maxPage}");
         $this->updateBookListImpl($bookList);
         $this->d("update list finish " . count($bookList) . " books");
         sleep(self::QUERY_SLEEP);
     } while (++$page <= $maxPage);
 }
コード例 #2
0
ファイル: m_http.php プロジェクト: poi5305/ptnovel
 public function testGetBookListPage()
 {
     PtHttpCk101::getBookListPage(1);
 }