PHP referrer URL of a page

by Nithya 2011-03-15 18:37:19

PHP referrer URL of a page

Referrer is the URL from where the visitor has arrived to the page. If you have reached here by clicking a link from google.com then google URL is the referrer for you in this page. We can find out the referrer by using PHP. This is useful for the webmasters to know where from the traffic to the site is coming. Which advertisement campaign is successful and which is not. We will also know the keywords used by the visitors in different search engines to arrive at the site.


Here is the simple code to know the referrer in PHP
$ref=@$HTTP_REFERER;

echo "Referrer of this page = $ref ";


This is the code and here is your referer to this page
http://www.hiox.org/PHP-referrer-URL-of-a-page.php

Tagged in:

2355
like
0
dislike
0
mail
flag

You must LOGIN to add comments