I am using simple_html_dom to fetch data from a website. I am getting this error: Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 3145728 bytes) in... Code (markup): My script first grabs a product listing page and then does a foreach loop to get the contents of each product. I have a memory problem somewhere in the loop that I cannot find. Please help me find it and a solution. I will send my script and the simple_html_dom class. Note: I cannot turn up the memory limit but I don't think that is the really the problem.