I thought I’d put my modified copy of Refer up here for future reference, because I just scraped it off my old blog due to dropping numbers of actual referers (since the blog is dead) and increasing numbers of referer spam. The copy includes a modification to read in a separate anti-spam
list of search engines (to be excluded from a truncated view), forbidden words and IP & host addresses – although the last two (IPwhack) don’t seem to be working for some reason – as well as some customized functions I’m too lazy to describe here.
Obviously, I’ve removed all database info from refer.php, so those need to be filled in before it’s usable, if even then.