Welcome to WebmasterWorld Guest from 54.147.10.72

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Discussion Board.Please Help!

How to keep "PESTS" away!

     

Senmar50

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

10+ Year Member



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
SenMar

dreamcatcher

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

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



SenMar,

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:


<?php
$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.

dc

 

Featured Threads

Hot Threads This Week

Hot Threads This Month