I'm trying to log all the referers to a website but I encountered this problem:
This is the test scenario I've created:
1a. goto.html
... contains the <a href=target.php>target</a> link.
1b. goto.php
... contains "<?php header("Location=target.php"); ?>
- target.php
-------------
... contains:
$ref = getenv("HTTP_REFERER");
echo "$ref";
Problem:
If I click the href link in goto.html, then target.php will show the "$ref" value as "goto.html".
However, if I click on the goto.php (which has a header() cmd, then target.php won't show anything - $ref="". How to solve this ?
How can I get the referering page if someone uses the 'header()' cmd ?
Appreciate any tips you might have.
Thanks !
Adrian