1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php echo "<pre>"; print_r($_POST); echo "</pre>";
$captcha=$_POST['g-recaptcha-response'];
//$secretKey = "6LfkzgoUAAAAAEkTzHmO_Bsu2UFI8vQPNajAKtdH"; // checkbox $secretKey = "6LdKQsoUAAAAAKwFbiUziGNAU5XFmwAGjxf5WbHk"; // invi $ip = $_SERVER['REMOTE_ADDR'];
$response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$captcha."&remoteip=".$ip); print_r("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$captcha."&remoteip=".$ip); $responseKeys = json_decode($response,true);
if(intval($responseKeys["success"]) !== 1) { echo '°ËÁõÀ» Åë°úÇÏÁö ¸øÇß½À´Ï´Ù.'; } else { echo $responseKeys; echo '°ËÁõÀ» Åë°ú Çß½À´Ï´Ù.'; } ?>
|