Re: fopen(); deciding if going for the IP or domain.

From: Date: Sun, 30 Jun 2002 18:07:10 +0000
Subject: Re: fopen(); deciding if going for the IP or domain.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-104588@lists.php.net to get a copy of this message
The manual shows fopen("http://www.php.net/","r") works. If you are saying it is only today that it is not working then I wonder if the server (or dns server for it) is down. If on unix, does "dig domain.com" give an ANSWER section with ip address? If on NT, does "nslookup domain.com" give an ip address? (with domain.com changed to be whatever server the url you are looking for is on). I don't know anything about the particular error you are getting but maybe the above are some pointers (assuming you didn't just do a typo). HTH Chris php@net.co.cr wrote:
Hello, Is there anyway I can do fopen to try to open a connection to a domain name, if it cant try opening it to the IP? For some weird reason today a domain name wont resolve and Iam getting this error: Warning: php_network_getaddresses: getaddrinfo failed: Name or service not known Thanks.


« previous php.general (#104588) next »