Latest referrals; Total referrals
I added a 10 latest referrals and highest 3 in total referrals to the bottom right sash of my webpage.
Here’s the source, it’s pretty straightforward…
SQL for the database:
CREATE TABLE `referrals` (
`id` int(11) NOT NULL auto_increment,
`url` varchar(100) NOT NULL default '',
`loads` int(11) NOT NULL default '0',
`last` varchar(15) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM ;
referrers.php (included in the main page)
Feel free to use it without notifying me… that’s why I posted it. The only thing you should have to do to make it work for your site is change
if($ref != "" & !strpos($ref, "raybdbomb.com") & !strpos($ref, "raydehler.com"))
to
if($ref != "" & !strpos($ref, "{yourdomain}") ) where {yourdomain} corresponds to your domain name.
Also, be advised that not all browsers respect the HTTP_REFERER server tag (sic), in fact I had 5 attempts earlier today from a referral spoofer.
Updated 2/10/05
