|
| $_SERVER['HTTP_REFERER']
The $_SERVER['HTTP_REFERER'] variable tells you from which webpage/site visitors to your pages came from by clicking a link.
Use as follows:
echo $_SERVER['HTTP_REFERER'];
If the visitor had entered your url onto their browser's address to get to a certain page on your site, then the $_SERVER['HTTP_REFERER'] variable will be empty.
Example:
We are using the $_SERVER['HTTP_REFERER'] on this page. If you came to this page from a link, you will see the referring page echoed below or empty if you came to this page directly through you browser's address bar as follows:
See also:
|
|