Thanks for your reply Tuan,
I'm actually in need of a solution for the time being. And I'm more interested in using reCAPTCHA — you didn't specify what your plans involved. So if you could please help me with some direction I would appreciate it.
I've figured out that I can display the ReCAPTCHA text character field on my confirmation form by placing the code quoted below at about line 211 on the confirmation form (/components/com_pmformviews/confirmation/tmpl/default.php):
Code:
<tr>
<td class="title_cell">Enter anti-spam text:</td>
<td class="field_cell">
<?php
require_once('includes/recaptcha/recaptchalib.php');
$publickey = "your_public_key"; // you got this from the signup page
echo recaptcha_get_html($publickey);
?>
</td>
</tr>
I've placed the reCAPTCHA library file (recaptchalib.php) on the server.
Where do I place the following server side code?:
Code:
<?php
require_once('path_to_file/recaptchalib.php');
$privatekey = "your_private_key";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
} else {
// Your code here to handle a successful verification
}
?>
It says to put it at the top of the form processing script, which in the confirmation form is a little more complicated than I can figure out.
Please advise.
Thanks,
Azurelink