1 |
85ad3d82
|
Assos Assos
|
<html>
|
2 |
|
|
<body>
|
3 |
|
|
<form action="" method="post">
|
4 |
|
|
<?php
|
5 |
|
|
|
6 |
|
|
require_once('recaptchalib.php');
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
$publickey = "";
|
10 |
|
|
$privatekey = "";
|
11 |
|
|
|
12 |
|
|
|
13 |
|
|
$resp = null;
|
14 |
|
|
|
15 |
|
|
$error = null;
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
if ($_POST["recaptcha_response_field"]) {
|
19 |
|
|
$resp = recaptcha_check_answer ($privatekey,
|
20 |
|
|
$_SERVER["REMOTE_ADDR"],
|
21 |
|
|
$_POST["recaptcha_challenge_field"],
|
22 |
|
|
$_POST["recaptcha_response_field"]);
|
23 |
|
|
|
24 |
|
|
if ($resp->is_valid) {
|
25 |
|
|
echo "You got it!";
|
26 |
|
|
} else {
|
27 |
|
|
|
28 |
|
|
$error = $resp->error;
|
29 |
|
|
}
|
30 |
|
|
}
|
31 |
|
|
echo recaptcha_get_html($publickey, $error);
|
32 |
|
|
?>
|
33 |
|
|
<br/>
|
34 |
|
|
<input type="submit" value="submit" />
|
35 |
|
|
</form>
|
36 |
|
|
</body>
|
37 |
|
|
</html> |