Most people have found Little Green Footballs referrer script. (I've implemented it here as well).
Here's a tip if you want to have it ignore another referrer… For example, there's a bot that's been crawling my blog (and a few other people's as well). It'll show up on the referrer list as every other entry (kind of annoying).
So here's a tip on how to add a referrer on the ignore list.
Open the lgf-reflog.php that comes with the referrer script.
ADD this line UNDER the $mydomain thingy:
$bot1 = 'TheReferrer.Thats.been.hitting.Your.Site';
Then change this line
if (($ref) and (!strstr($ref, $mydomain))) {
To this:
if (($ref) and (!strstr($ref, $mydomain)) and (!strstr($ref,$bot1)) ) {
easy peasy.