file_get_contents(): php_network_getaddresses: getaddrinfo

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

file_get_contents(): php_network_getaddresses: getaddrinfo

Post by kendall »

Hi people in trying to run a

Code: Select all

echo file_get_contents("http://www.example.com");
I get the errors
Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: No address associated with hostname

Warning: file_get_contents(http://www.example.com): failed to open stream: Operation timed out3
Now this was working for a while now before and its only by "chance" that I stumbled upon this error. Someone said its a DNS error but is the DNS Error on my scripts part? my Host part? or ISP part? What could it be? What does it mean and How can it be resolved?
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

Re: file_get_contents(): php_network_getaddresses: getaddrin

Post by kendall »

Just to note using an IP address seems to work but unfortunately i'm using API's and subdomains so substituting IPs won't work :(
Post Reply