<?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>