While usign the function get_headers()
for example, If i wrote
get_headers("www.websitedoesntexist.com");
i get the following error
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
I want to know how to handle these problems, Something like
if (isset(get_headers("www.websitedoesntexist.com"))) {
echo "URL Exists";
}