I am using cakephp. I am trying get data from facebook using file_get_contents. I get a warning.
Warning (2): file_get_contents()
file-access is disabled in the server
configuration Warning (2):
Is there any way to get the data?
I appreciate any help.
This is a configuration issue on your server.
In your php.ini you most probably have
allow_url_fopen = Off
If you want to allow this, set it to on. Be aware though that the reason it’s turned off by default is that it’s more secure.
A common alternative is to use cURL instead; you might want to check if your hosting environment offers that.