Contribute  :  Support  :  Downloads  :  Forum  :  Links  :  Polls  :  Calendar  :  Directory  :  Advanced Search  
Geeklog The Ultimate Weblog System
Welcome to Geeklog
Thursday, May 15 2008 @ 11:49 PM EDT
   

Referrer Spam & Visitor Stats Plugin

SpamHi, this is just a short note about referrer spam and the problem I've had with it and the Visitor Stats plugin by Tom Willet and John Huges, I believe... My site, www.justrage.com gets loads and loads of referrer spam for some obscure reason, and I've always had a hard time doing htaccess magic. So here's what I do and it works for me.

Assuming, of course, you have the Visitor Stats plugin, go to your /plugins/stats directory, open functions.inc and find the following line:

if ($host == 'geeklog.sourceforge.net') {
  $host = 'geeklog.sf.net';
}
And then add the following new line under it:

if (ereg("word", $host)) {
  $host = '';
}
// the '' are single quotes, not a double quote
Change "word" to a specific string in the referring URL you want to block. For instance if you want to block http://something.ne.com you chould change "word" to "something" or "ne" or "com" or even "ne.com". What happens is that the code will simply rub out ALL the referring urls that contain "word" anywhere in it. It will only rub out the URL from the Stats phpblock, though, not the stats pages themselves. Which works fine for me anyway.

Add as many lines under it for as many "words" you need to block.

To my knowledge and experience, SpamX only blocks comment spam, and htaccess is just too complicated for me. So this is what I simply do to resolve my referrer spam issues. Hopefully, in the future someone could update the Stats plugin to include an easy way of doing it from its admin frontend.

Story Options

Referrer Spam & Visitor Stats Plugin | 2 comments | Create New Account
The following comments are owned by whomever posted them. This site is not responsible for what they say.
use my htaccess file
Authored by: arthur on Monday, April 25 2005 @ 12:38 AM EDT
You are all welcome to use my htaccess file. Referer spam had reached
50% of my pageviews, but I was able to filter almost all of it by using
an htaccess approach similar to Creator's.

Now, I use VisitorStats to notice new bad referers sneaking past the
system. I view pages by time of day. If I see a new referer or a new
keyword, I add them to my htaccess file then delete the visitor stats
entries off my GL database.

---
Arthur (http://www.shrednow.com)
Referrer Spam & Visitor Stats Plugin
Authored by: tomw on Monday, April 25 2005 @ 09:08 AM EDT
This is one issue that my ban plugin addresses, it was around long before spam-x and it has a nice front-end.