Changes in configuration file Copy recaptchalib.php from the recaptcha download into the /includes/ucp directory
Find this code in ucp_register.php:
} $confirm_image = ''; $s_hidden_fields .= ''; }
...and add this directly underneath:
include_once('recaptchalib.php'); $publickey = '6LcKEggAAAAAAIjIdnGkyP7xrex_DPK-UCITnft4'; $confirm_image = recaptcha_get_html($publickey); Find this code ...in ucp_register.php else { $error[] = $user->lang['CONFIRM_CODE_WRONG'}; $wrong_confirm = true; } } else { $error[] = $user->lang['CONFIRM_CODE_WRONG']; $wrong_confirm = true; } } } */ ...and then add the following code just below the previous code. This does reCAPTCHA authentication.
require_once('recaptchalib.php'); $privatekey = '6LcKEggAAAAAAEYH6L6FWP1LnZY27t5X5CTFD779'; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp->is_valid) { //die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." ."(reCAPTCHA said: " . $resp->error . ")");
$error[] = $user->lang['CONFIRM_CODE_WRONG'];
wrong_confirm = true; }
Lastly comment the following
//'confirm_code' => array('string', !$config['enable_confirm'], CAPTCHA_MIN_CHARS, CAPTCHA_MAX_CHARS),
This will help you in installing reCAPTCHA easily.
To understand how reCAPTCHA works, please register with http://forums.pcquest.com
Get most out of your technology infrastructure investments with Dell
About CIOL | Media Kit | Site Map | Contact Us | Help | Write to us | Jobs@CyberMedia | Privacy Policy
Copyright © CyberMedia India Online Ltd. All rights reserved. Usage of content from web site is subject to Terms and Conditions.