I'm still lost to that, they made it a PHP function.
As a matter of fact here is the code:
<?php
require_once('recaptchalib.php');
$publickey = "...";
$privatekey = "...";
# the response from reCAPTCHA
$resp = null;
# the error code from reCAPTCHA, if any
$error = null;
# are we submitting the page?
if ($_POST["submit"]) {
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if ($resp->is_valid) {
echo "You got it!";
# in a real application, you should send an email, create an account, etc
} else {
die("Invalid Input, you must be a spam bot.")
# set the error code so that we can display it. You could also use
# die ("reCAPTCHA failed"), but using the error message is
# more user friendly
$error = $resp->error;
}
}
echo recaptcha_get_html($publickey, $error);
?>
The problem is the submit function on this only works for submitting that form to test the text. So I need to have a global submit function or something like that to send it if they are right, and stop it all together if they aren't. Or something like I stated earlier, have a trigger from them getting this image correct and causing the actual submit button to appear.
Thank you, the Javascript idea does make sense though.