title: file_get_contents when url doesn't exist
body: <p>I'm using file_get_contents() to access a URL. </p>
  
  <pre><code>file_get_contents('http://somenotrealurl.com/notrealpage');
  </code></pre>
  
  <p>If the URL is not real, it return this error message. How can I get it to error gracefully so that I know that the page doesn't exist and act accordingly without displaying this error message?</p>
  
  <pre><code>file_get_contents('http://somenotrealurl.com/notrealpage') 
  [function.file-get-contents]: 
  failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found 
  in myphppage.php on line 3
  </code></pre>
  
  <p>for example in zend you can say: <code>if ($request-&gt;isSuccessful())</code></p>
  
  <pre><code>$client = New Zend_Http_Client();
  $client-&gt;setUri('http://someurl.com/somepage');
  
  $request = $client-&gt;request();
  
  if ($request-&gt;isSuccessful()) {
   //do stuff with the result
  }
  </code></pre>