|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-07-05 08:59 UTC] jos_php dot net at interexa dot 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...
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 07:00:01 2025 UTC |
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.