Welcome Guest, Not a member yet? Register   Sign In
reCAPTCHA 2
#1

[eluser]Blazeme[/eluser]
Hello everyone!
This code is originally is written by: vendiddy (Topic) but, it's using old validation class.
This one is packed and it uses new version of validation class.

Important! You must have account on reCAPTCHA.NET to get public and private keys. Without keys, this addon won't work!!

Pack is here, it contains ReadMe and code.

Hope you'll like this one.
Please report bugs and etc here.
Thanks.

Edit:
You can also download this addon from Wiki .
#2

[eluser]dexcell[/eluser]
Thanks
#3

[eluser]Blazeme[/eluser]
Np, when you guys test it out, please let me know Smile
#4

[eluser]OES[/eluser]
I did have a small issue with this.

Due to extanding the Form Validation I had to do add this-> before CI. ie.

Code:
function recaptcha_matches()
    {
        $this->CI =& get_instance();
        $this->CI->config->load('recaptcha');
        $public_key = $this->CI->config->item('recaptcha_public_key');
        $private_key = $this->CI->config->item('recaptcha_private_key');
        $response_field = $this->CI->input->post('recaptcha_response_field');
        $challenge_field = $this->CI->input->post('recaptcha_challenge_field');
        $response = recaptcha_check_answer($private_key,
                                           $_SERVER['REMOTE_ADDR'],
                                           $challenge_field,
                                           $response_field);
        if ($response->is_valid)
        {
            return TRUE;
        }
        else
        {
            $this->CI->form_validation->recaptcha_error = $response->error;
            $this->CI->form_validation->set_message('recaptcha_matches', 'The %s is incorrect. Please try again.');
            return FALSE;
        }
    }

Hope this helps.
#5

[eluser]BrandonDurham[/eluser]
Anyone know how to get two recaptchas on one page? It currently will only display the second recaptcha.
#6

[eluser]BrandonDurham[/eluser]
For those wondering, I had to use the ajax method: http://recaptcha.net/fastcgi/demo/ajax
#7

[eluser]BrandonDurham[/eluser]
Okay, now I've been informed that it's throwing an error. When you submit the form the "To use reCAPTCHA you must get an API key from..." error pops up. Any ideas?
#8

[eluser]The Wizard[/eluser]
Hello!

anyone had success while, loading the VALIDATION settings from form_validation.php ?
if i put the vali settings there, it dosnt seem to work Sad
#9

[eluser]ahmad karim[/eluser]
I have added this function in my Form_validation.php. is it important to add the helper MY_Validation_helper.php. i am not able to check if the captcha enterd is correct or not. there is no validation applying on captcha field. i.e. recaptcha_challenge_field. help please.

[quote author="OES" date="1226855802"]I did have a small issue with this.

Due to extanding the Form Validation I had to do add this-> before CI. ie.

Code:
function recaptcha_matches()
    {
        $this->CI =& get_instance();
        $this->CI->config->load('recaptcha');
        $public_key = $this->CI->config->item('recaptcha_public_key');
        $private_key = $this->CI->config->item('recaptcha_private_key');
        $response_field = $this->CI->input->post('recaptcha_response_field');
        $challenge_field = $this->CI->input->post('recaptcha_challenge_field');
        $response = recaptcha_check_answer($private_key,
                                           $_SERVER['REMOTE_ADDR'],
                                           $challenge_field,
                                           $response_field);
        if ($response->is_valid)
        {
            return TRUE;
        }
        else
        {
            $this->CI->form_validation->recaptcha_error = $response->error;
            $this->CI->form_validation->set_message('recaptcha_matches', 'The %s is incorrect. Please try again.');
            return FALSE;
        }
    }

Hope this helps.[/quote]
#10

[eluser]Jujubins[/eluser]
An Error Was Encountered
Your application/config/recaptcha.php file does not appear to contain a valid configuration array.

What I can do?




Theme © iAndrew 2016 - Forum software by © MyBB