Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $captcha;
- if(isset($_POST['g-recaptcha-response'])){
- $captcha=$_POST['g-recaptcha-response'];
- }
- if(!$captcha){
- echo "CAPTCHA NULL";
- exit;
- }
- $response=json_decode(file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=6Ld65gYTAAAAANnz1olMsUH2-SdWJOfB_ztlvOrF&response=".$captcha."&remoteip=".$_SERVER['REMOTE_ADDR']), true);
- if($response['success'] == false)
- {
- echo "CAPTCHA WRONG";
- }else
- {
- echo "CAPTCHA RIGHT :)";
Advertisement
Add Comment
Please, Sign In to add comment