PHP fopen Reading a Remote File

You need to chech that allow_url_fopen is On or Off.

if (ini_get(‘allow_url_fopen’) == ‘1’) {
echo “allow_url_fopen = On”;
} else {
echo “allow_url_fopen = Off”;
}

If allow_url_fopen is Off, you should open php.ini and convert allow_url_fopen = Off to allow_url_fopen = On