
 Peter Wong - 2007-05-14 04:21:05
Hi,
I am a newbie so please be gentle! 
I have been charged with modifying some php pages and include controls that will reduce the number of spam.
I have a form page (contact.php)to which I added the following lines:
require_once("fsbb.php"); 
$blocker=new formSpamBotBlocker(); 
$hiddenTags=$blocker->makeTags(); 
contact.php in turn calls ContactFormProcessor.php which validates the entries on the form and submits the email. I've added the code in:
require_once("fsbb.php"); 
$blocker=new formSpamBotBlocker(); 
$blocker->setTimeWindow(2,30); // set the min and max time in seconds for a form to be submitted 
$blocker->setTrap(true,"mail"); // called here, because it has been called on the form page as well (same trap name!) 
$param=false; 
$nospam=false; 
    if ($_POST) $param=$_POST; 
    elseif ($_GET) $param=$_GET; 
    if (!$param) die("Error"); 
Am I on the right track? I'm very very new to PHP so no flames please!
PW