note 61113 deleted from reserved.variables by philip
| From: | philip@php.net | Date: | Wed, 21 Feb 2007 16:01:08 +0000 |
| Subject: | note 61113 deleted from reserved.variables by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-123645@lists.php.net to get a copy of this message | ||
Note Submitter: Gerry
----
In relation to Mr. Obvious' comment concerning using apache_request_headers() to get a more
reliable referer. I don't believe this works as both it and PHP would be retrieving the
information from the 'referer' header. All you would be doing by using
apache_request_headers() is giving yourself more work.
Some test code which shows that both are identical:
<?php
$host=apache_request_headers();
echo "\$host['Referer'] = {$host['Referer']}\n";
echo "\$_SERVER['HTTP_REFERER'] = {$_SERVER['HTTP_REFERER']}\n";
?>
You can edit the referer using a tool such as the LiveHTTPHeaders extension for Firefox.
If there was a more accurate way of determining the referer, then PHP would most likely be doing it.