I was trying to use the script given here php get all the images from url which width and height >=200 more quicker
I downloaded and used the simple_html_dom.php given here http://sourceforge.net/projects/simplehtmldom/
It works for most urls, but when I use something like http://www1.macys.com/shop/mens-clothing/mens-athletic-wear?id=59165&edge=hybrid&cm_sp=us_men%27s-men%27s-apparel-activewear-_-t-shirts#!fn=APPAREL_TYPE%3DT-Shirts%26sortBy%3DORIGINAL%26productsPerPage%3D40&!qvp=iqvp
The script simply crashes. Can someone help?
EDIT:
I put error reporting and it gives this.
Fatal error: Call to a member function find() on a non-object in /var/www/smartbiz/smartbiz/test2.php on line 16
line 16:if ($html->find ( 'img' )) {
EDIT2: Not sure if this is relevant PHP simple html dom: apache crashes, PHP simple html dom: apache crashes
You can wrap your code in a try-catch statement.
It sounds like the error is that the HTML is not loading. We’ll need more of your code otherwise I can just give you basic debugging advise.
Try putting the HTML in another way.
I hope this helps.