Re: Spam opinions please

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 20 Oct 2009 14:31:53 -0400
"Gary" <gwpaul@xxxxxxx> wrote:

> I have several sites that are getting hit with form spam.  I have the
> script set up to capture the IP address so I know from where they
> come.  I found a short script that is supposed to stop these IP
> addresses from accessing the form page, it redirects the spammer to
> another page (I was going to redirect to a page that has lots of
> pop-ups, scantily clad men and offers of joy beyond imagination), but
> someone suggested I redirect to the Federal Trade Commission or
> perhpas the FBI.
> 
> Any thoughts on the script and its effectivness?
> 
> <?php
> $deny = array("111.111.111", "222.222.222", "333.333.333");
> if (in_array ($_SERVER['REMOTE_ADDR'], $deny)) {
>    header("location: http://www.google.com/";);
>    exit();
> } ?>Gary 
> 
> 

There are several options to stop spammers, although none of them will
completely eliminate all spam. For a forum I prefer the .htaccess
method.

There is a website dedicated to keeping track of forum spammers,
http://stopforumspam.com and  depending on your forum you could add an
anti-spam mod that will query their database. On the site they have
mods for phpbb, vBulletin and SMF.

I wrote a Python script that uses a Python Library that's also posted
on their site. The Python program basically use an Apache log file for
the IP's checks them at Stop Forum Spam and adds spam IP in
the .htaccess file. I have it set up in cron to run daily.
For a little bit more detailed description and the program itself:
http://blog.avirtualhome.com/2009/10/08/stop-spammers-in-your-htaccess/


-- 
Peter van der Does

GPG key: E77E8E98

IRC: Ganseki on irc.freenode.net
Twitter: @petervanderdoes

WordPress Plugin Developer
Blog: http://blog.avirtualhome.com
Forums: http://forums.avirtualhome.com
Twitter: @avhsoftware

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux