title: How to handle get_headers() function if URL doesn't exist
body: <p>While usign the function <code>get_headers()</code> for example, If i wrote</p>
  
  <p><strong><code>get_headers("www.websitedoesntexist.com");</code></strong></p>
  
  <p>i get the following error</p>
  
  <blockquote>
    <p>Warning: get_headers(): php_network_getaddresses: getaddrinfo failed:
    No such host is known Warning:
    get_headers(www.websitedoesntexist.com): failed to open stream:
    php_network_getaddresses: getaddrinfo failed: No such host is known</p>
  </blockquote>
  
  <p>I want to know how to handle these problems, Something like</p>
  
  <pre><code>if (isset(get_headers("www.websitedoesntexist.com"))) {
      echo "URL Exists";
  }
  </code></pre>