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
To see why a file_get_contents call might have failed, you could just use php's error_get_last function:
if ($contents = file_get_contents($url)) { // it worked } else { die("Failed to fetch ".$url.", error: ".error_get_last()['message']); }