I am trying to update some values ββfrom one server to another using a cron job. I am using file_get_contents ().
The strange thing is that this sometimes happens. One minute it works, another minute it wonβt work. I get these two errors:
PHP Warning: file_get_contents (): php_network_getaddresses: getaddrinfo failed: name or service unknown
PHP Warning: file_get_contents (): failed to open stream: php_network_getaddresses: getaddrinfo failed: name or service unknown
and
PHP Warning: file_get_contents (): php_network_getaddresses: getaddrinfo failed: No address associated with the host name
PHP Warning: file_get_contents (): could not open the stream: php_network_getaddresses: getaddrinfo failed: There is no address associated with the host name
I registered on a server that is experiencing this problem. Using ping or traceroute works fine, so I eliminated the problems with DNS. I also added google DNS servers to be sure. A third server that uses the same code does not have this problem, so it looks like a problem on the "calling" end, rather than on the "response". Replacing the hostname IP is not an option for this case.
Does anyone know how to solve this?
php dns file-get-contents
Anorionil
source share