It looks like your hosting provider has disabled the necessary option to allow this function to work, which is allow_url_fopen (read about this option in the PHP manual here).

If you want to read the contents of a remote file, try using the PHP curl library; there's an example page in the PHP manual here about how to use it.

I hope this answers your question.

i could not find te correct is saying the same error after using the function.can u give me some other solution.i will be thankful for your advice.

Make a new file called php.ini in the directory where this script runs from and inside it put:

allow_url_fopen = "1"


This article has been dead for over six months. Start a new discussion instead.