I\'m trying to update some values from one server to another server with a cron job. I use file_get_contents().
The strange thing is that this fails occasionally. One min
In my case, the trouble was that Apache get the DNS entries from /etc/resolv.conf
when it starts. By the time I started my Apache, the network was not set yet. Restarting Apache (after networking is configured) solved the problem for me.
I explained the case in more details on my blog post http://diogomelo.net/blog/16/Warning-file_get_contents-php_network_getaddresses-getaddrinfo-failed-No-address-associated-with-hostname