<?php
echo $HTTP_REFERER;
?>
The page referrer is found by using the $HTTP_REFERER variable. This is a quick way of looking up where people are navigating to your pages from. Once you know this information you can also filter users based upon it. For example, you only let people who come from one of your referring pages to use your downloads section, etc. Unfortunately $HTTP_REFERER is not foolproof. Some browsers do not send this information, or can be made to send false information. You should keep this in mind when working with $HTTP_REFERER.

