NuCaptcha CodeIgniter Plugin
Documentation
CodeIgniter is an open source web application framework for use in building dynamic web sites with PHP. The CodeIgniter framework has helper functions and libraries for form input and validation. The NuCaptcha CodeIgniter Plugin allows you to display and validate NuCaptcha using the CodeIgniter form libraries.
Installation of the NuCaptcha CodeIgniter Plugin is easy!
Install Instructions
- Download and Unzip the latest NuCaptcha CodeIgniter Plugin
- Copy helpers/MY_form_helper.php into your application/helpers directory.
- Copy libraries/MY_Form_validation.php into your application/libraries directory.
- Add a new entry named 'nucaptcha_clientkey' to your application/configs/config.php file with your NuCaptcha Client Key (sign up here to get your client key)
NuCaptcha enables input rendering and validation by extending CodeIgniters built-in 'form' helper and 'form_validation' library.
Simply include these libraries as you would in any other form implementation and you're good to go.
Add NuCaptcha to your forms
First, render 'nucaptcha' fields in your view. Make sure the CodeIgniter form helper has been loaded first.
Next, add 'nucaptcha' a validation rule in your controller. This time, make sure the CodeIngitor form_validation library is loaded
Sample Code
See controllers/sample.php and views/nucaptcha_*.php provided in the NuCaptcha CodeIgniter Plugin download package for a full working example
Requirements
NuCaptcha has the following runtime requirements:
- PHP 5.1 or newer
- PHP mcrypt module must be installed and active (this is the case for most PHP installations)
- A NuCaptcha Client Key. Get yours FREE here
- This plugin was written for CodeIgniter 2.0 but should be easily modified to work in older versions.
Support
We're here to help! If you have any questions please contact us!