I am making use of simplehtmldom which has this funciton:
// get html dom form file function file_get_html() { $dom = new simple_html_dom; $args = fu
Use CURL to get the URL and handle the error response that way.
Simple example from curl_init():