MyBB Hacks

Full Version: Recaptcha Help
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
for anti brute force protection

I am lost I can not integrate recaptcha into index_login page ?

1) in login_form ?

PHP Code:
<?php
require_once('recaptchalib.php');

$publickey = "public_key"; // you got this from the signup page

$recaptcha_code = recaptcha_get_html($publickey); 
?>

2) in member.php ?

PHP Code:
<?php
  require_once('recaptchalib.php');
  $privatekey = "private_key";
  $resp = recaptcha_check_answer ($privatekey,
                                get_ip(),
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

  if (!$resp->is_valid) {
    // What happens when the CAPTCHA was entered incorrectly
    error('Die bots!!!!');
  }


thx in advance

Doesn't MyBB already support this feature?

I'm not sure what you're trying to do with that code anyway.
Reference URL's