PHP Question
i want open an web addresse using the php function $x=file($url) ..
here is the problem: if the $url address don't exist then i get an Warning error: "php_network_getaddresses: getaddrinfo failed"
in a such case i don't want the warning error to be displayed.. i just want to display a message like "can't access url"
i've tryed next code:
$x=file($siteurl) or die("Can't access $url");
but first i get the warning error and after that my message...
anybody have an ideea how can i make to display just my message in the case that the $url don't exist?
|