Home     BiggerPockets    

phpBB Forum Spammer Registration Mod – Kill the SpamBots!

December 19th, 2006 by Joshua Dorkin | Filed under Forums, Web Applications.

I found a great mod for phpBB forum administrators. This particular mod will ban any user who registers for your forum from a particular time zone. I’m not sure if many newbies to phpBB are aware, but most SPAM registrations come from GMT-12 Timezone. If you can prevent users from registering from that zone, you’ll go a long way to stop these SPAM-Bots.

Ban User Registration Based on TimeZone aka. SpamBot Timezone Registration Mod

Just alter the timezone range to prevent bots and people from zones you don’t want them coming from.

#
#—–[ OPEN ]——————————————
#
includes/usercp_register.php
#
#—–[ FIND ]——————————————
#
$sql = “SELECT MAX(user_id) AS total
#
#—–[ BEFORE, ADD ]——————————————
#
if (($user_timezone < -5) || ($user_timezone > 5))
{
$message = ‘Sorry, you appear to have triggered our spam security system. Please go back and modify some of the information and try again.

To give you a hint, we only accept registrations from people based in (or near) the GMT time zone area.

‘;
message_die(GENERAL_MESSAGE, $message);
}
#
#—–[ CLOSE/SAVE ALL FILES ]—————————————
#

Thanks to InertaM for sharing this with everyone.

9 Responses to “phpBB Forum Spammer Registration Mod – Kill the SpamBots!”

  1. wesley | 19/12/06

    Yes, lets block people from those timezones. How utterly stupid! Please don’t spread this crap.

  2. Papouch | 12/06/07

    its enough to block -12 timezone and all users from .ru, gawab.com cashette.com and all fake registration are gone…

  3. Joshua Dorkin | 12/06/07

    That pretty much covers it Papouch.

  4. Roma | 5/09/07

    Thanks for the tricks it really stopped all the spam for my phpbb board.

  5. Matthew Cook | 11/09/07

    I might have to suggest this to a friend of mine who is having some spam problems.

    Who knows it might actually work really well.

    Thanks.

  6. Matthew Cook | 11/09/07

    Thanks this will help out my buddy who has been having some problems on his forum.

  7. Robert Kldjian | 11/09/07

    Thanks for this. I really appreciate it. For those who are having some troubles, look at this below:

    This looks like it only works with forums hosted with domains, etc, not one of those freebie forums like eAmped.com, informe.com, etc. anyway,

    1.) SEND the [includes/usercp_register.php] to anywhere on you computer, by using an FTP Program, Frontpage will do, CoreFTP Lite would do as well.

    2.) After you have saved it someone where on your computer, I HIHGLY recommend you do duplicate it and paste the same exact copy somplace else just in case you mess it up.

    3.) Then right click on one of those files you saved and go [OPEN WITH] And Select Notepad, WordPad, etc, but I highly recommend Notepad.

    4.) After you selected Notepad, Hit CTRL + F, and when the box shows up, type in —> SELECT MAX 5))
    {
    $message = ‘Sorry, you appear to have triggered our spam security system. Please go back and modify some of the information and try again.To give you a hint, we only accept registrations from people based in (or near) the GMT time zone area.’;
    message_die(GENERAL_MESSAGE, $message);
    }

    6.) Hit the TAB button a few time to make it align with the rest of the text. Look at this following image, just to make sure you got it at the right spot:

    http://i17.tinypic.com/6cp7mg6.jpg

    ZOOM in to see it.

    Anyway, I hope this helped.

    -Robert

  8. Dan | 25/07/08

    This mod no longer works. Spambots have learned to register using board time.

  9. Facebook Flash Programmer | 16/07/09

    Hey its really great way to stop spammers. Nice tips Thanks for shairng

Share Your Thoughts