public static function trataCaptcha() { $resp = null; $error = null; $captcha = new captcha(); if ($_POST["recaptcha_response_field"]) { $resp = $captcha->recaptcha_check_answer(PRIVATE_KEY_CAPTCHA, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if ($resp->is_valid) { return true; } else { echo '- Entrada incorreta no captcha'; die; } } //echo recaptcha_get_html($publickey, $error); }