Forum Moderators: coopster

Message Too Old, No Replies

Google “No CAPTCHA reCAPTCHA” and languages

         

toplisek

9:05 pm on Nov 12, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



<?php
require_once "recaptchalib.php";

$secret = "9kcePAATAAAAAGPRWgx90814DTjgt5sXnN347WaW"; // your secret key
$response = null;// empty response
$reCaptcha = new ReCaptcha($secret);// check secret key
if ($_POST["g-recaptcha-response"]) { // if submitted check response
$response = $reCaptcha->verifyResponse(
$_SERVER["REMOTE_ADDR"],
$_POST["g-recaptcha-response"]
);
}
?>

<!DOCTYPE HTML>

<html>

<head>
<title>Google “No CAPTCHA reCAPTCHA” and languages</title>
<meta charset="utf-8" />
</head>

<body>

<?php
if ($response != null && $response->success) {
echo "Thank you for submitting the form!";
} else {
print "<form action=\"\" method=\"post\">
<dl>
<dd><div class=\"g-recaptcha\" data-sitekey=\"9kcePAATAAAAAGPRWgx90814DTjgt5sXnN347WaW\"></div></dd>
</dl>

<input type=\"submit\" value=\"Submit\" />
</form>"; ?>
<?php } ?>
<!--js-->
<script src="https://www.google.com/recaptcha/api.js?render=explicit&hl=de" async="" defer=""></script>
</body>

</html>

whitespace

9:18 am on Nov 18, 2015 (gmt 0)

10+ Year Member Top Contributors Of The Month



What actually is the question?

toplisek

4:19 pm on Nov 18, 2015 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I will post inside Javascript as this is actually CallBack function.