I have list of website which I am passing to function doScrape() this function creates SimpleHtmlDom object and load the url passed to it as a argument.
But when scraper is in progress one url can't be loaded and PHP throws following exception
Warning: file_get_contents(http://www.somesite.com) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 500 Internal Server Error in F:\xampp\htdocs\scraping\scraper\simple_html_dom.php on line 850
Due to this error entire scraper stops working. How to handle this exception and keep scraper running event there is an error.