[eluser]Wonder Woman[/eluser]
Hi,
I've tried implementing recaptcha in to my form but it's throwing an error.
I have loaded my helper:
Code:
$this->load->helper('recaptchalib_helper');
My Controller:
Code:
$publickey = $this->config->item('recaptchakey');
$data['recaptchakey'] = $publickey;
$return = recaptcha_check_answer($publickey, $_SERVER["REMOTE_ADDR"], $this->input->post("recaptcha_challenge_field"), $this->input->post("recaptcha_response_field"));
if($this->form_validation->run() == FALSE){
$this->load->view('form', $data);
} else {
if(!$return->is_valid) {
echo 'failed';
$this->load->view('form', $data);
} else {
echo 'success';
$this->load->view('form', $data);
}
The recurring error is "invalid-site-private-key" and "incorrect-captcha-sol" - can someone tell me where I am going wrong please? Thanks in advance.