file_get_contents is a good quick way to get file contents through the file system or over a supported protocol. The problem with it is, that it really doesn’t do very well at simulating an actual web client.
There is an optional module for Apache called mod_security, which uses special rules to filter out what might be bad requests.
One of the many rules that can be used, is one that stipulates that the user-agent string cannot be blank. file_get_contents sends only minimal headers, and presumably does not send a user-agent string of any kind.
If you run into that particular problem, try using CUrl or an http client class like Snoopy. You may have better luck with something like that, because it fully simulates a web client in a way that the file system functions were not designed to.