SQL PHP HTML ASP JavaScript articles and free scripts to download If you are facing any problem in viewing this page, please tell us
 

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 "<font face='Verdana' size='3'><b>Referrer of this page  = $ref </b>";

This is the code and here is your referer to this page


Same way you can find out the ip address of visitors to your site by using PHP. Click here to know the IP address by using PHP.

Getting referrer URL in ASP

Read article on visitor tracking

Some of the browsers setting can be changed to stop the browser from sending any referrer information. Read here to know how you can change the settings for FireFox browser for referrer.

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) in /home/smo123/public_html/tracking/track.php on line 8
Could not connect to MySQL