1. Home
  2. Computing & Technology
  3. PHP / MySQL

Finding the HTTP_REFERER
Find out where your viewers are coming from

By Angela Bradley, About.com

<?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.

More PHP / MySQL Quick Tips
Explore PHP / MySQL
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL
  4. Learn PHP
  5. Find HTTP_REFERER - Lookup Http Referer - Http Referrer PHP

©2009 About.com, a part of The New York Times Company.

All rights reserved.