#10142 [Com]: $HTTP_USER_AGENT 'breaks' in a URL-included file

From: Date: Tue, 20 Jul 2004 14:59:48 +0000
Subject: #10142 [Com]: $HTTP_USER_AGENT 'breaks' in a URL-included file
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-62756@lists.php.net to get a copy of this message
ID: 10142 Comment by: extreme-insertion1426 at hotmail dot com Reported By: bobby dot jack at excite dot com Status: Bogus Bug Type: Reproducible Crash Operating System: sparc-sun-solaris2.6 PHP Version: 4.0.4pl1 New Comment: <a href=http://megaextreme-inserti.da.ru>insertion extreme</a> Previous Comments: ------------------------------------------------------------------------ [2001-04-03 15:08:12] sniper@php.net submitted twice ------------------------------------------------------------------------ [2001-04-03 12:30:47] bobby dot jack at excite dot com $HTTP_USER_AGENT reports an unexpected value when inlcuded via a URL-reference: e.g. test1.php -- <?php echo $HTTP_USER_AGENT; ?> -- test2.php -- <?php include "http://servername.com/test1.php"; ?> -- http://servername.com/test1.php displays (example): Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) http://servername.com/test2.php displays: PHP/4.0.4pl1 I can understand why this happens: when including a URL-referenced file, PHP obviously acts as the HOST that makes the request. However, is there a workaround for this? - Bobby. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=10142&edit=1

« previous php.bugs (#62756) next »