At 09:49 07.09.2002, Ilia A. wrote: >Current implementation of fopen() and any other built in functions that allow >opening of Urls, always sends a User-Agent: PHP/PHP_VERSION header when >sending the request, which cannot be disabled by the user. >Afaik this header is entirely optional and in some cases even causes problems >if the site decides to do User-Agent based blocking. The biggest example of >this I could find was Google, that blocks client sending the User-Agent: >PHP/PHP_VERSION header from accessing any of the search result pages and will >send a 403 error message. I imagine there are probably plenty of other web >sites that are doing the same or will do so in the future.
Disabling or sending some other stuff seems like a good idea for me. But according to your example i think google prohibts accessing their search engine etc. through software... >Perhaps, it would make sense to add an option inside php.ini allowing the >user >to disable the sending of this header. Otherwise to reliably open remote >URLs, users need to use CURL or manually negotiate connections via >fsockopen() or the sockets extension. This is especially annoying, since no >where in the PHP documentation is it mentioned that this header is sent when >PHP initiates a connection to HTTP or HTTPS. > > >Ilia > >-- >PHP Development Mailing List <http://www.php.net/> >To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php