tags:

views:

393

answers:

3

My web host just disabled fopen()

My script used to open and write to a text file on the server, but no longer can.

Is there an alternative function to fopen?

+1  A: 

Not that I know of. But it's a perfectly safe function to use on shared hosting (BUT ONLY IF the environment is set up right), so if your host disabled it for security reasons they're security noobs and you should find a new host.

Find a new one anyways

Joshua
+2  A: 

I don't think cURL requires allow_url_fopen to be enabled. However, the cURL extension must be installed. Use phpinfo() to check if it's installed.

It's a little more advanced than your normal fopen() or file_get_contents() but it's definitely an alternative.

Mike B
A: 

If it's available you could probably replicate your script with cURL

http://us3.php.net/cURL

Jared