How can i add exception?
<p>I have a  php site <strong>www.test.com.</strong></p>

<p>In the index page of this site ,i am updating another site's(www.pgh.com) database by  the following php code.</p>

<pre><code>$url = "https://pgh.com/test.php?userID=".$userName. "&amp;password=" .$password ;
$response = file_get_contents($url); 
</code></pre>

<p>But,now the site <code>www.pgh.com</code> is down.So it also affecting my site  'www.test.com'.</p>

<p>So how can i add some exception or something else to this code,so that my site should work if other site is down</p>
