'https://www.google.com/recaptcha/api/siteverify', CURLOPT_POST => true, CURLOPT_POSTFIELDS => ['secret' => $recaptcha_secret, 'response' => $recaptcha_response], CURLOPT_RETURNTRANSFER => true ]); $recaptcha = curl_exec($ch); curl_close($ch); $recaptcha = json_decode($recaptcha); if ($recaptcha->success && $recaptcha->action == 'contact' && $recaptcha->score >= 0.5) { $recaptcha_valid = true; } } if (!$recaptcha_valid) { die("You have been detected as a bot and blocked from submitting this form for security reasons, please try again shortly or Contact us if you are still having issues."); } } ?>