Easy reCaptcha library |
[eluser]GabrielGem[/eluser]
Hi! This is my library for easy reCaptcha installation for CI. How to use Easy reCaptcha library for Codeigniter: 1) First of all, register at the reCaptcha by Google: http://www.google.com/recaptcha Press button "USE reCAPTCHA ON YOUR SITE", then "SIGN UP NOW" and fill the data about your site. Then reCaptcha will generate for you 2 keys: Public Key and Private Key. Do not lose these keys!; 2) Put "recaptcha.php" library to the application/libraries folder of codeigniter; 3) Open your controller and put these code (don't forget insert your PUBLIC KEY, that was generated above): CODE: Code: $publickey= "YOUR PUBLIC KEY"; EXAMPLE: Controller Code: $publickey= "YOUR PUBLIC KEY"; View Code: <form method="post" action="controller"> VIA VIEW. You can also realize that via view CODE: Code: <?php EXAMPLE: Code: <form method="post" action="controller"> 4) Open your controller (ACTION attribute of form above) and paste these code (don't forget replace YOUR PRIVATE KEY with your new generated key): CODE: Code: $this->load->library('recaptcha');
[eluser]cPage[/eluser]
Code: Fatal error: Class 'ReCaptchaResponse' not found in C:\wamp\www\ggci_2013-01-20_current\application\libraries\recaptcha.php on line 88 Where is the missing class ? Code: $recaptcha_response = new ReCaptchaResponse();
[eluser]wr5aw[/eluser]
I use it as a helper. I just dropped it in the helper folder as is and named it captcha_helper.php. You only have to call two functions to use it.
|
Welcome Guest, Not a member yet? Register Sign In |