+1

    Afaik this was already brought up.

    Maybe someini entry like

        php.user_agent (or whatever fits best)

    which is of type string:

        ini_set("php.user_agent", "Tawnee Stone Virus");

    and can be disabled with:

        ini_set("php.user_agent", "");

    I.e. special case, empty user agent string == don't send it.

On Sat, Sep 07, 2002 at 03:49:35AM -0400, 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.
> 
> 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

-- 
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc
"In short, the window belongs to me.
 The document belongs to the web site designer."
- Poster on opera.wishlist

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to