<?php
// call the lib..
require_once (TEMPLATEPATH . '/includes/lib/recaptchalib.php');
$resp = null;
$error = null;
// Get a key from http://recaptcha.net/api/getkey
$publickey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
$privatekey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
# was there a reCAPTCHA response?
if ($_POST["submit"]) {
$response = recaptcha_check_answer($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if ($response->is_valid) {
cp_contact_ad_owner_email($post->ID);
$msg = '<p class="green center"><strong>' . __('Your message has been sent!', 'appthemes') . '</p>';
} else {
# set the error code so that we can display it
$msg = '<p class="red center"><strong>' . __('The anti-spam reCaptcha answer was incorrect!' , 'appthemes') . '</p>';
}
}
?>
There are currently 1 users browsing this thread. (0 members and 1 guests)