Simple Spam stopper

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • teetwo
    Special Status

    • Feb 2008
    • 14

    Simple Spam stopper

    If you are servicing your form with your own script
    then a real simple Captcha is:-
    Instruct for instance "Enter the 2nd letter in 'Members_Name' "
    Place an extra editbox "Entered" in the form area and the first lines of the validation script is:-

    PHP Code:
    <?php
    // receive from form. An example I use
    $Members_Name=$_POST['Members_Name'];// Name checked against
    $Members_Email=$_POST['Members_Email'];
    $Entered=$_POST['Entered'];// User Entry

    $a substr($Members_Name11); // gives second letter of Members_Name

    if($a!=$Entered){// compare the two. Not matching
       //The BV Captcha validation
          
    echo '<b>The entered code was wrong.</b><br>';
          echo 
    '<a href="javascript:history.back()">Go Back</a>';
          exit;
       }

    //Correct Continue processing

    ?>
    Any input could be used and any letter position. The input is only one letter and stops Bots you could request more letters. It is simple and does not use graphics.

    Don't you just love PHP?
    Terry
  • teetwo
    Special Status

    • Feb 2008
    • 14

    #2
    Re: Simple Spam stopper

    I forgot to add you need to set minimum characters and data required.
    But you knew that.
    Terry

    Comment

    Working...
    X