How to skip code when file_get_contents fails?
<p>When I use a valid URL like the following, <code>file_get_contents</code> will return html code</p>

<pre><code>$html = file_get_contents("http://www.google.com/");
</code></pre>

<p>but if the URL was invalid:</p>

<pre><code>$html = file_get_contents("http://www.go1235ogle.com/"); //Invalid URL. This line give Error Message
</code></pre>

<p>my code will output an error message <code>Notice: Trying to get property of non-object</code></p>

<p>if <code>file_get_contents</code> can't open a given URL, I want to hide the error message it's outputting and skip the code bellow it with an <code>if else</code> statement.</p>

<pre><code>if (FALSE === $html) 
{
  //skip the code in here ?
}
</code></pre>

<p>but the code above doesn't help. Can you please tell me how can I correct this problem?</p>
