Bug #18183 Updated: [RFE] Configurable "User-Agent" in php_fopen_url_wrap_http()
| From: | edink@php.net | Date: | Fri, 05 Jul 2002 22:23:29 +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-13277@lists.php.net to get a copy of this message | ||
ID: 18183
Updated by: edink@php.net
Reported By: jos_php.net@interexa.de
-Status: Open
+Status: Won't fix
Bug Type: Feature/Change Request
Operating System: all
PHP Version: 4.1.2
New Comment:
I don't think this is really necessary. The fopen wrappers were
designed for consistency among different ways of getting data, not to
support every little detail of every protocol. If you do need greater
control, I suggest using cURL functions.
Previous Comments:
------------------------------------------------------------------------
[2002-07-05 16:50:12] tal@php.net
Markus - i agree.
I totally forgot about INI :-)
-Tal
------------------------------------------------------------------------
[2002-07-05 16:30:24] mfischer@php.net
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.
------------------------------------------------------------------------
[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