Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <?php
- $captcha;
- if (isset($_POST['g-recaptcha-response'])) {
- $captcha = $_POST['g-recaptcha-response'];
- }
- if (!$captcha) {
- echo '<h2>Fail</h2>
- <h3>Compila il captcha in maniera coretta... </h3></center>
- <center><h4>come illustrato nell immagine</h4>';
- exit;
- }
- $ip = $_SERVER['REMOTE_ADDR'];
- $response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=" . $recaptchasecretKey . "&response=" . $captcha . "&remoteip=" . $ip);
- $responseKeys = json_decode($response, true);
- if (intval($responseKeys["success"]) !== 1) {
- echo '<h2>Complimenti</h2>
- <h3>Modulo inviato correttamente.<br> Anche se hai premuto troppe volte il tasto invio :)</h3></center>
- <center><h4>Verrai automaticamente riportato alla home a breve</h4>
- <meta http-equiv="refresh" content="10;URL=https://sanik.it">';
- } else {
- echo '<h2>Complimenti</h2>
- <h3>Modulo inviato correttamente</h3></center>
- <center><h4>Verrai automaticamente riportato alla home a breve</h4>
- <meta http-equiv="refresh" content=";URL=../index">';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement