1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
<?php $captcha=$_POST['g-recaptcha-response'];
$secretKey = "6LfkzgoUAAAAAEkTzHmO_Bsu2UFI8vQPNajAKtdH"; $ip = $_SERVER['REMOTE_ADDR'];
$response = file_get_contents("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 '검증을 통과 했습니다.'; }*/ ?>
|