Answer the question
In order to leave comments, you need to log in
Why does the script break when parsing with the PHP Simple HTML DOM library?
When parsing a site, a loop is launched to collect links to a certain type of page. It takes only one iteration, if you put a limit on one iteration, then the script exits the loop successfully, having worked out what is needed, but when there are more than one iterations, the script is interrupted immediately after the first one and the browser writes "Data not received", or "Web page unavailable" Error code: ERR_INCOMPLETE_CHUNKED_ENCODING. I set the script running time to 0, increased the memory limit, everything works fine on the local server in the Denwer assembly. The server is interrupted.
Answer the question
In order to leave comments, you need to log in
Compare web server settings, replace local config with server one or vice versa.
Most likely trite, somewhere, something is configured wrong.
Maybe you should try to look at the web server logs?
If there's nothing there, you can write your own error_handler and write errors somewhere to a file...
Or run the script via sssh and see what's going wrong.
It's the same for me, but I think it's not SimpleHTMLDom, it's file_get_contents()...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question