Bug #18183 Updated: [RFE] Configurable "User-Agent" in php_fopen_url_wrap_http()
| From: | mfischer@php.net | Date: | Fri, 05 Jul 2002 20:30:25 +0000 |
| Subject: | Bug #18183 Updated: [RFE] Configurable "User-Agent" in php_fopen_url_wrap_http() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-13270@lists.php.net to get a copy of this message | ||
ID: 18183
Updated by: mfischer@php.net
Reported By: jos_php.net@interexa.de
Status: Open
Bug Type: Feature/Change Request
Operating System: all
PHP Version: 4.1.2
New Comment:
Why not an ini setting like fopen.user_agent ?
I think we should use the INI infrastructure if we want to make thsi
customizeable at all. There's no need to add a new function when we
simply can do
ini_set("fopen.user_agent", "foobar");
We can even query it with ini_get(), means we don't need a
get_user_agent() and we can give it a default value like "PHP <version
numer>" if it's not set at all.
Previous Comments:
------------------------------------------------------------------------
[2002-07-05 16:10:06] tal@php.net
Maybe a set_user_agent() function?
-Tal
------------------------------------------------------------------------
[2002-07-05 09:19:38] derick@php.net
Recategorize
------------------------------------------------------------------------
[2002-07-05 08:59:54] jos_php.net@interexa.de
It would be helpful if the "User-Agent"-String in fopen('http://...')
calls would be configurable.
The file affected is ext/standard/http_fopen_wrapper.c, line 180.
Maybe we could define a global variable which is set to
"PHP/PHP_VERSION" by default, but can be overwritten. Or an optional
parameter to the fopen() function. But would be also useful in
include() calls...
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=18183&edit=1