reCAPTCHA and WAMP server
Posted by:
ankur.vyas1
(106.66.73.---)
Date: May 29, 2013 03:35PM
Can I check if reCAPTCHA is working locally on WAMP server? Is there a way to test if server-side validation is working with PHP because I am using WAMP server and the reCAPTCHA appears fine on the HTML form and there is a submit.php file that has the following code:
require_once('recaptchalib.php'); // reCAPTCHA Library
$privkey = ""; // Private API Key
$verify = recaptcha_check_answer($privkey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]);
echo $verify->is_valid;
echo $verify->error;
if ($verify->is_valid) {
// never enters here
}
Another problem is that echo $verify->is_valid does not print out anything.