Php sinippet: howto ignore HTTP errors in file_get_contents()

Posted on Fri 04 November 2011 in PHP

A useful snipped of php code:

echo file_get_contents('http://www.example.com/foo.html',\
  FALSE, stream_context_create(array\
  ('http'=>;array('ignore_errors' =>; TRUE))))