Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Discussion Board.Please Help!

How to keep "PESTS" away!

4:16 pm on Jun 4, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:Sept 21, 2004
votes: 0

Hi All,

I have a nice discussion board on my web site.
Everyday I have to remove loads of pain in the butt posts. The comments board was created using a simple php script. How can I avoid this from happening, without setting a password to gain access. I really do not want to set a password to the board. My visitors really enjoy the freedom
of posting to the board, without using passwords.
Can anyone help? I can post the script here if you need me to.

Thanks in Advance
You Guys/Ladies are Great

4:36 pm on June 4, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member dreamcatcher is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 30, 2003
votes: 0


A couple of effective solutions might be to include a Captcha image, or something less server intense like a simple sum. This is what I use on a lot of my sites.

So, firstly, generate 2 random numbers:

$one = rand(1,9);
$two = rand(11,99);

Assign these to hidden fields on your post page:

<input type="hidden" name="first" value="<?php echo $one;?>">
<input type="hidden" name="second" value="<?php echo $two;?>">

Pop a live box on the post form:

For spam prevention, add the following sum:<br>
<?php echo $one;?>+<?php echo $two;?> = <input type="text" name="sum">

Then do a check when posted:

if ($_POST['first']+$_POST['second']!=$_POST['sum'])
// error

Something simple like that should be ok. Of course if you have people actually posting then you have a problem. This should be effective enough to stop the spam software.



Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members