I am using file_get_contents to get api result from a URL in json format. However, there is an issue in file_get_contents when i call the url. The error returns is
file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known
The url im using is calling a load balancer server before forward to the main api server. If i were to directly change the url to main api server ip address, i am able to get the results. However, if i call through load balancer url it returns error message
Is it something i need to configure in loadbalancer server?
I'm actually calling a internal server api domain. So, i had to configure the server host file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.