View Single Post
  #3  
Old 01-27-2010, 04:45 PM
BMR777 BMR777 is offline
Member
 
Join Date: Jan 2011
Posts: 1,122
Gender: Male
Credits: 16,994
BMR777 is on a distinguished road
Default RE: Installing CAPTCHA - Where to put these two PHP codes?

I would suggest ReCaptcha:

http://recaptcha.net/

Adding that would be super easy.

To use the one you are using though, maybe something like...

Find:

PHP Code:
else{

    
//We are attempting to register the user...

    //First MD5 hash the passwords:

    
$pass1 md5($pass1);
    
$pass2 md5($pass2); 
Replace With:

PHP Code:
else{

    
//We are attempting to register the user...

include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';

$securimage = new Securimage();

    
//First MD5 hash the passwords:

    
$pass1 md5($pass1);
    
$pass2 md5($pass2); 
Find:

PHP Code:
    else if($tos != "yes"){

    
//User did not agree to TOS
    
$article_title "Terms of Service Error";
    
$article_content $notos;

    } 
Replace With:

PHP Code:
else if($tos != "yes"){

    
//User did not agree to TOS
    
$article_title "Terms of Service Error";
    
$article_content $notos;

    }
else if(
$securimage->check($_POST['captcha_code']) == false){

// The captcha is wrong, put your message here...

$article_title "Captcha Incorrect";
$article_content "Captcha Incorrect";


Try that and see if it works. :)
Reply With Quote