PHP Get contents of webpage

前端 未结 2 406
孤街浪徒
孤街浪徒 2021-01-17 07:08

So I am using the PHP Simple HTML DOM Parser to get the contents of a webpage. After I knew what I was doing was right, I still got the error that there was nothing to be fo

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-17 07:44

    simple_php_dom.php contains:

    define('MAX_FILE_SIZE', 600000);
    ...
    if (empty($contents) || strlen($contents) > MAX_FILE_SIZE)
    {
        return false;
    }
    

    The second page is over 672000 bytes, so this size check fails. Increase that constant and you should be OK.

提交回复
热议问题