I had the same problem, could not load using file_get_contents (), but using curl on the command line for the same URL worked fine. It turned out that he tried to connect via IPv6, which failed.
I solved this by disabling IPv6 in my kernel settings.
source
share