homepage Welcome to WebmasterWorld Guest from 54.226.43.155
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Discussion Board.Please Help!
How to keep "PESTS" away!
Senmar50




msg:1297053
 4:16 pm on Jun 4, 2006 (gmt 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
SenMar

 

dreamcatcher




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved