What are the requirements for opening a url?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I already have allow_url_fopen to On, but I still can't open any urls using  
fopen or readfile. Anything with http in it like  
http://xbox360cheat.org/codes.html ends up getting a permission denied. I'm  
not sure why this is because I don't see anyone else have this problem. I'm  
using php5 and fedora httpd which I believe is their apache2 server. Thanks  
for any help.

Re: What are the requirements for opening a url?

JJ wrote:

Quoted text here. Click to load it

Where? php.ini or an Apache conf file? If the latter, make sure you're
using "php_flag" instead of "php_value".

Toby A Inkster BSc (Hons) ARCS
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

Re: What are the requirements for opening a url?

Check that allow_url_fopen is set to on (e.g. using phpinfo()).

Also, the website might refuse to serve non-browser client (it might
be checking for HTTP_AGENT value). Update the value in php.ini, to the
one used by some browser.

If that didn't work, than you might be the victim of the same bug as
me :). On my server I can't open short URLs.

Add say 100 characters to the URL u r opening and retry.

e.g. fopen("http://yourserver.com/somepage.html?

That worked like a charm for me (a quick fix untill I figure out what
is the actual problem).

Site Timeline