D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
thread-self
/
root
/
home
/
shubmkcj
/
designpitara.com
/
ajax
/
Filename :
recaptcha-test.php
back
Copy
<?php if(isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])){ $re_captcha = $_POST['g-recaptcha-response']; $secretKey = "6LeOYc8dAAAAAFQYm5rGp28LL1EY0OXJiDSCYWM2"; $ip = $_SERVER[‘REMOTE_ADDR’]; $response = file_get_contents( "https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$re_captcha."&remoteip=".$ip ); $responseKeys = json_decode( $response, true ); if ( intval( $responseKeys["success"] ) !== 1 ) { echo "false"; }else{ echo "true"; } } ?>