Am I the only one who can see the obvious confusion here?
HTTP_REFERRER is the address of the page where the user clicked on a link to come to your website. HTTP_REFERRER tells you where your visitors came from.
HTTP_REFERRER has absolutely nothing to do with anything that allows you to
Record the link you clicked to leave my page.
Did you mean to ask something else? Or am I the one who's confused?
If you want to record the links people use to leave your pages, you can:
1. Use javascript (
ajax) to make a call to a script that will register the click (and url) before the user leaves
OR
2. Use a redirection script (something like /go.
php?url=XXX) where you can register the outgoing link, THEN redirect the user to whatever URL they clicked on
Google uses the 1st method, which requires a little more technical knowledge, but the 2nd method is very easy to implement and the most popular...