lato client (javascript)
http://www.javascript-page.com/referrer.html
lato server (php)
http://www.plus2net.com/php_tutorial/php_referrer.php