Thread: PHP Question
View Single Post
Old 02-28-2004, 10:58 AM  
alex79
Confirmed User
 
Join Date: Jun 2002
Location: france
Posts: 996
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?
alex79 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote