Run 2
G Captcha
Frontend
css --- html ----
js --
Backend
PHP --- /* reCAPTCHA */ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($post['recaptcha_response'])) { $recaptcha_url = 'https://www.google.com/recaptcha/api/siteverify'; $recaptcha_secret = 'cle_secrete'; $recaptcha_response = $post['recaptcha_response']; $recaptcha = file_get_contents($recaptcha_url.'?secret='.$recaptcha_secret.'&response='.$recaptcha_response); $recaptcha = json_decode($recaptcha); if ($recaptcha->score < 0.5) { $error['status'] = true; $error['info'][] = "Error Google Captcha"; exit(); } } else { $error['status'] = true; $error['info'][] = "Error Google Captcha"; exit(); }
lintermediaire.be