<?php
/*
reCAPTCHA is a free CAPTCHA service that protect websites from spam and abuse. This is Google authored code that provides plugins for third-party integration with reCAPTCHA.
*/
require_once "./_inc/recaptchalib_inc.php";
$publickey = “xxxxxxx";
$privatekey = “yyyyyyy";
/*
#CONFIG
$toAddress = "[address removed], [address removed], [address removed]"; //client's email
$toName = "Marvel Champions"; //place your client's name here
$website = "Marvel-Champions"; //place NAME of your client's website here
$sendEmail = TRUE; //if true, will send an email, otherwise just show user data.
$sendto = "[address removed], [address removed]";
$submited = "website mail";
*/
if(isset($_POST['submit']))
{
$email=$_POST['email'];
$comment=$_POST['comment'];
$captcha=$_POST['g-recaptcha-response'];
if(!$captcha)
{
echo 'Please check the the captcha form.';
}
. $privatekey . "}&response="
. $captcha . "&remoteip="
. $_SERVER['REMOTE_ADDR']);
if($response.success==false) {
echo "Thank you for your message.";
} else {
echo 'Comment sent!';
}
}
foreach ($_POST as $key => $value) {
echo '<p><strong>' . $key.':</strong> '.$value.'</p>';
}
$SpamErrorMessage = "Sorry - No Website URLs Permitted";
if (preg_match("/http/i", "$name")) {echo "&spamErrorMessage"; exit();}
if (preg_match("/http/i", "$email")) {echo "&spamErrorMessage"; exit();}
if (preg_match("/http/i", "$message")) {echo "&spamErrorMessage"; exit();}
?>
<html>
<head>
</head>
<body>
<? var_dump($_POST) ; ?>
<h1>Test reCAPTCHA</h1>
<form action="" method="post">
<label>Email</label>
<div>
<input name="email" type="email" placeholder="Type Your Email" size="39" />
</div>
<br>
<label>name</label>
<div>
<input name="name" type="text" placeholder="Type Your Email" size="39" />
</div>
<br>
<label>Comment</label>
<div>
<textarea name="$message" cols="40" rows="5" placeholder="Type You Comment..."></textarea>
</div>
<br>
<div class="g-recaptcha" data-sitekey="<? $publicKey ; ?>"></div>
<input type="submit" value="submit" />
</form>
</body>
</html>