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 scrapper 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\scrapper\simple_html_dom.php on line 850
Due to this error entire scrapper stops working. How to handle this exception and keep scrapper running event there is an error.
No comments:
Post a Comment