sendm

[insert_php]

//Checking For reCAPTCHA
$captcha;
if (isset($_POST[‘g-recaptcha-response’])) {
$captcha = $_POST[‘g-recaptcha-response’];
}
// Checking For correct reCAPTCHA
$response = file_get_contents(“https://www.google.com/recaptcha/api/siteverify?secret=6Lc5FcgiAAAAAPo8Gpx1ofdiP1feY6rTmg9TpsdX” . $captcha . “&remoteip=” . $_SERVER[‘REMOTE_ADDR’]);
if (!$captcha || $response.success == false) {
echo “Your CAPTCHA response was wrong.”;
exit ;
} else {

$para = ‘[email protected]’;
$titulo = ‘Mensaje enviado desde figallo.agency’;

$mensaje=”Mensaje enviado mediante la web \n\n”;
foreach ($_POST as $key => $value) {
$mensaje .= htmlspecialchars($key).”: “.htmlspecialchars($value).”\n”;
}

$cabeceras = ‘From: [email protected]’ . “\r\n” .
‘X-Mailer: PHP/’ . phpversion();

mail($para, $titulo, $mensaje, $cabeceras);

header(“Location: /thankyou”,TRUE,301);

}

[/insert_php]