Hi all,
I'm having a problem with PHP's function file_get_contents. It only happens with hostnames, e.g. echo file_get_contents('http://www.google.com'); which takes up to 8 seconds before it's getting the file contents.
When I'm using file_get_contents() with an IP address it loads the page in less than a second.
So, it seems something is wrong with my DNS settings. However, when I login with SSH on the webserver I can ping www.google.com and traceroute www.google.com in less than a second aswell.
Does anybody have any suggestions to find out how to fix this problem?
Thanks!
I'm having a problem with PHP's function file_get_contents. It only happens with hostnames, e.g. echo file_get_contents('http://www.google.com'); which takes up to 8 seconds before it's getting the file contents.
When I'm using file_get_contents() with an IP address it loads the page in less than a second.
So, it seems something is wrong with my DNS settings. However, when I login with SSH on the webserver I can ping www.google.com and traceroute www.google.com in less than a second aswell.
Does anybody have any suggestions to find out how to fix this problem?
Thanks!