#27041 [Bgs->Opn]: Cannot set referer in header function
| From: | it_chan at hotmail dot com | Date: | Mon, 26 Jan 2004 04:41:17 +0000 |
| Subject: | #27041 [Bgs->Opn]: Cannot set referer in header function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-53885@lists.php.net to get a copy of this message | ||
ID: 27041
User updated by: it_chan at hotmail dot com
Reported By: it_chan at hotmail dot com
-Status: Bogus
+Status: Open
Bug Type: HTTP related
Operating System: windows xp/redhat 7.3
PHP Version: 4.3.4
New Comment:
Check this out. Though I am not a perl guru, I found this link which
says you can do it.
"The most frequently used headers can also be accessed through the
following convenience methods. These methods can both be used to read
and to set the value of a header. The header value is set if you pass
an argument to the method. The old header value is always returned. If
the given header did not exists then undef is returned."
The list includes: $h->referer
Here is the URL: http://www.perldoc.com/perl5.8.0/lib/HTTP/Headers.html
Previous Comments:
------------------------------------------------------------------------
[2004-01-25 19:52:38] iliaa@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Only the browser can send that header.
------------------------------------------------------------------------
[2004-01-25 19:42:59] it_chan at hotmail dot com
Description:
------------
A web page (a.php) has a link to (b.php), when the link is clicked I
want to http referer in b.php to show that referer is some other x.php
as if the link was on x.php.
Reproduce code:
---------------
# a.php
<?php
header('Referer: http://localhost.com/x.php', true);
?>
<a href="/b.php"> check </a>
#b.php
<?php
echo "referrer = " . $_SERVER['HTTP_REFERER'];
?>
Expected result:
----------------
referrer = http://localhost/x.php
Actual result:
--------------
referrer = http://localhost/a.php
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27041&edit=1