Welcome Guest, Not a member yet? Register   Sign In
Problems with recaptcha installation
#1

[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.
#2

[eluser]craig.hoog[/eluser]
I believe, if I'm not mistaken, that this is a reCaptcha error stating that you don't have a valid private site key.

I would fix that one first, it might just fix the second one at the same time.
Just make sure you have a valid API key in your configuration.




Theme © iAndrew 2016 - Forum software by © MyBB