|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #10141 $HTTP_USER_AGENT 'breaks' in a URL-included file
Submitted: 2001-04-03 12:30 UTC Modified: 2003-04-21 23:53 UTC
From: bobby dot jack at excite dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.0.4pl1 OS: sparc-sun-solaris2.6
Private report: No CVE-ID: None
 [2001-04-03 12:30 UTC] bobby dot jack at excite dot com
$HTTP_USER_AGENT reports an unexpected value when inlcuded via a URL-reference:


<?php echo $HTTP_USER_AGENT; ?>

<?php include ""; ?>
-- displays (example):
  Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) displays:

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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-04-03 12:41 UTC]
maybee there should be a way to define the USER_AGENT
for HTTP fopen wrapper?

moved to feature requests
 [2003-04-21 23:53 UTC]
Implemented Sep 7 (http_fopen_wrapper.c : r-1.43) by Sterling

Exists in PHP 4.3 and later.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Jul 23 19:01:29 2024 UTC