I was using PHP Simple HTML dom, a great and free library for parsing html pages and retreiving info from it. I really liked it.. But when it comes to parsing many differents pages of some website in one php script, you will get an error:
Allowed memory size of 67108864 bytes exhausted,
and this is because simple HTML dom don't free up the memory in real time, so the solution is:
Each time you create a dom object ( foe exemple using: $html = file_get_html("http://someurl/"); or str_get_html... ), then when you don't need it anymore you have to call _destruct:
$html->_destruct();
unset($html);
Search With Google
Categories
- 1-General (3)
- 2-Getting started (4)
- 3-Strings (10)
- 4-Server config (1)
- 5-Best scripts (7)
- email (4)
- files (6)
- Forms (3)
- If statements (3)
- Loop statements (2)
- Mysql (2)
- Server variables (3)
- Sessions (1)
- Tutorials-planet.com (1)
- web hosting (1)
- You need a programmer ? (1)