Web design and SEO - Blog
  • Home
  • Contact me
  • CMS
  • SEO
  • Web design
  • Website
Home » CMS » Stop spam bots in phpbb (phpbb3)
May23 0

Stop spam bots in phpbb (phpbb3)

Posted by admin in CMS

Here I will show you one easy, but effective, way to deal with spam bots, that are taking over your phpbb3 forum. Ever since I am using this method, I had zero spam bot registrations.

As I said, we are talking about phpbb3 and to be more exact version 3.0.3, but probably it will work on others too. The theme that I am using is prosilver, but you can use different one. In that case there will be some different things you must do. And here is what you must do.

Download via ftp program the file ucp_register.php, located in the folder includes/ucp/. Before editng it, you can back it up, just in case. Open it and before this line:

if ($agreed)

put this line:

$stopbots = ($_POST['stopbots']==8) ? true : false;

Then instead of this line:

if (!check_form_key('ucp_register'))

put this line:

if (!check_form_key('ucp_register') || !$stopbots)

Save and upload the new file instead of the old one.

Now you need to edit the file ucp_register.html, which is located in styles/prosilver/template/. If you are using another theme, then it will be in different folder. Open the file and after this code:

<dl>
<dt><label for="password_confirm">{L_CONFIRM_PASSWORD}:</label></dt>
<dd><input type="password" tabindex="5" name="password_confirm" size="25" value="{PASSWORD_CONFIRM}" title="{L_CONFIRM_PASSWORD}" /></dd>
</dl>

put this code:

<dl>
<dt><label for="stopbots">Which is the number between 7 and 9?</label></dt>
<dd><input name="stopbots" id="stopbots" type="text" size="25" /></dd>
</dl>

Or in other words, put this code (ot similar code) in the place you want a new field to apear in the registration form. Save this file and upload it.

Basically the idea is to add an extra field, with a question that only people can answer. There is that kind of field already but many bots knowing about it, are prepared and pass through it. Our field is something they do not expect and do not know about.

You can change the question Which is the number between 7 and 9?, but if you do that, you must also change the answer, which is the number 8 in this line:

$stopbots = ($_POST['stopbots']==8) ? true : false;

If a wrong answer is written by user or spam bots, they get a message that the form is invalid and to try again.

Leave a Comment Cancel reply

Your email address will not be published. Required fields are marked *

*

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Categories

  • CMS
  • SEO
  • Web design
  • Website

Recent Posts

  • What is web design?
  • The first step in SEO optimization of a site
  • Stop spam bots in phpbb (phpbb3)
  • User friendly web design
  • Colors in web design

Tags

Audience Blog Bounce rate CMS Colors Copied content First step Navigation Objectives phpBB Purpose Revenue Spam User friendly

© 2011 Web design and SEO - Blog | Designed by Elegant Themes | Powered by WordPress