alternative scripts for fopen

Anima_Hariop's Avatar, Join Date: Jan 2009
Newbie Member
Many free web hosts set allow_url_fopen to off and that's why I can't use fopen. I just want to know if there is a way I can open a file, specifically a text file (*.txt), via an external url.
programmersbank's Avatar, Join Date: Apr 2009
Light Poster
if you have a .txt file on same server then use fopen function, you can see details at

or use this line in your .htaccess file
php_value allow_url_fopen 1

you can consider using curl, if it is enabled.
pradeep's Avatar, Join Date: Apr 2005
Team Leader CURL is cool, try that.