$email_id;$mobnum;$captcha; if(isset($_POST['email_id'])){ $email_id=$_POST['email_id']; }if(isset($_POST['mobnum'])){ $mobnum=$_POST['mobnum']; }if(isset($_POST['g-recaptcha-response'])){ $captcha=$_POST['g-recaptcha-response']; } if(!$captcha){ echo '

Please check the the captcha form.

'; exit; } $secretKey = "6Lf39gMTAAAAAHpCN2uOZ3yHUtuPjlykjRp0irC1"; $ip = $_SERVER['REMOTE_ADDR']; // post request to server $url = 'https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode($secretKey) . '&response=' . urlencode($captcha); $response = file_get_contents($url); $responseKeys = json_decode($response,true); if($responseKeys["success"]) { echo '

Thanks for posting comment

'; } else { echo '

You are spammer ! Get the @$%K out

'; } ?>