#18183 [Opn->Csd]: [RFE] Configurable "User-Agent" in php_fopen_url_wrap_http()

From: Date: Tue, 28 Jun 2005 21:14:06 +0000
Subject: #18183 [Opn->Csd]: [RFE] Configurable "User-Agent" in php_fopen_url_wrap_http()
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-81148@lists.php.net to get a copy of this message
ID: 18183 Updated by: nlopess@php.net Reported By: jos_php dot net at interexa dot de -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: all PHP Version: 4.1.2 New Comment: This already exists in PHP 5 via contexts and an ini option. Previous Comments: ------------------------------------------------------------------------ [2002-07-06 08:36:33] jos_php dot net at interexa dot de I sure think this is necessary! fopen() or even include() is the easiest way to "tunnel" a website throgh another, but without the ability to use the same agent identifier as the calling browser the called website will send the wrong data if it distingishes between different browsers. The user may get javascript errors for example. ------------------------------------------------------------------------ [2002-07-05 18:23:29] edink@php.net 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. ------------------------------------------------------------------------ [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 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/18183 -- Edit this bug report at http://bugs.php.net/?id=18183&edit=1

« previous php.bugs (#81148) next »