Trying to get information from an external source, I'm receiving the following error:
Warning: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in line #...
Yesterday everything was fine, so what happened to this script, which is not working and gives me the error above? Any solution or hint to solve this problem?
$uri = "http://api.hostip.info/?ip=$ip&position=true"; $dom->load($uri);
I also tried by converting DNS to IP but then I get the warning: failed to open
$uri = "174.129.200.54/?ip=$ip&position=true";
I tried to remove the http
but am still getting the above error.
It's because you can't resolve the host name Maybe DNS problems, host is unreachable...
try to use IP address instead of host name... ping this host name... nslookup it...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With