only your host can allow this action – speak with them
Yes, this is a pain. it means your host has probably decided it is a security threat and turned it off.
At least that is what my host has told me.
This is what they suggested:
We have disabled allow_url_fopen php configuration on the server due to its hacking vulnerabilities, very few applications require it, and by disabling it we will prevent exploitation of PHP remote include vulnerabilities.
Applications that do require it can be modified to use cURL instead.
Please contact your developer and modify the code in your filename.php as follows.
Instead of:
$file_contents = file_get_contents(‘http://example.com/ ‘);
// display file
echo $file_contents;
?>
Use this:
$ch = curl_init();
$timeout = 5; // set to zero for no timeout
curl_setopt ($ch, CURLOPT_URL, ‘http://example.com ‘);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);
// display file
echo $file_contents;
?>
If anyone knows what that means and on which file to make these changes please post here.