Hello!
I want to extend my registration procedure with a visual confirmation code. Are there (free) script-samples out there that can generate such an image?
thank you,
Hello!
I want to extend my registration procedure with a visual confirmation code. Are there (free) script-samples out there that can generate such an image?
thank you,
Try searching for "CAPTCHA" (Completely Automated Public TuringTestToTell Computers & Humans Apart). Here's one:
hi
there should be many such scripts
php script confirmation code
php script spam protection
php script form "anti spam"
Here is an article about, how to prevent guestbook spam.
This little guestbook is small and you should be able to
see how this guestbook handles this in coding, if you download script.
http://www.phpjunkyard.com/tutorials/guestbook-spam.php
The solution?
Use a guestbook that has anti-spam measures. My guestbook script "GBook" prevents automatic submissions by employing a security code. This is a 5-digit number which changes every time someone wants to post a message and has to be correctly typed by the person posting the message in order successfully submit it. See Screenshot 1 below:
great - thanks.
.
Here are those bits of code that does this 'secnum' ckeck in
As you can see a combination of a filter string
and current date is used:
$secnumber .= $settings['filter_sum'] . date('dmy');
<?php
/* Checksum - just type some digits or chars. Used to help prevent SPAM */
$settings['filter_sum']='du3psfwewr';
//////////////////////////////////////////////////
/* And this will start session which will help prevent multiple submissions */
if($a=='add') {
session_start();
if (empty($_SESSION['checked'])) {
$_SESSION['checked']='N';
$_SESSION['secnum']=rand(10000,99999);
$_SESSION['checksum']=$_SESSION['secnum'];
session_regenerate_id();
}
}
/////////////////////////////////////////////////////
if ($_SESSION['checked'] == 'N')
{
print_secimg($name,$from,$email,$url,$comments,$isprivate);
}
elseif ($_SESSION['checked'] == $settings['filter_sum'])
{
$_SESSION['checked'] = 'N';
$secnumber=gbook_isNumber($_REQUEST['secnumber']);
if(empty($secnumber)) {print_secimg($name,$from,$email,$url,$comments,$isprivate,1);}
$secimg=check_secnum($secnumber,$_SESSION['checksum']);
if (empty($secimg))
{print_secimg($name,$from,$email,$url,$comments,$isprivate,2);}
}
////////////////////////////////////////////
function check_secnum($secnumber,$checksum) {
global $settings;
$secnumber.=$settings['filter_sum'] . date('dmy');
if ($secnumber == $checksum)
{
unset($_SESSION['checked']);
return true;
}
else
{
return false;
}
} // END check_secnum
?>
<p> </p>
<p>This is a security check that prevents automated signups of this guestbook (SPAM).
Please enter the security number displayed below into the input field and click
the continue button.</p>
<p> </p>
<p>Security number: <b><?php echo $_SESSION['secnum']; ?></b><br>
Please type in the security number displayed above:
<input type="text" size="7" name="secnumber" maxlength="5" id="input"></p>