Weird error using PHP Simple HTML DOM parser

前端 未结 9 1398
梦谈多话
梦谈多话 2020-11-29 10:30

I am using this library (PHP Simple HTML DOM parser) to parse a link, here\'s the code:

function getSemanticRelevantKeywords($keyword){
    $results = array(         


        
9条回答
  •  遥遥无期
    2020-11-29 11:04

    The reason for this error is: the simple HTML DOM does not return the object if the size of the response from url is greater than 600000.
    You can void it by changing the simple_html_dom.php file. Remove strlen($contents) > MAX_FILE_SIZE from the if condition of the file_get_html function.
    This will solve your issue.

提交回复
热议问题