Tutorial by Examples

This helper is loaded using the following code: In Controller itself(* can repeat again and again*) $this->load->helper('captcha'); In config/autoload.php (Load only once) $autoload['helper'] = array('captcha');
Takes an array of information to generate the CAPTCHA as input and creates the image to your specifications, returning an array of associative data about the image. [array] ( 'image' => IMAGE TAG 'time' => TIMESTAMP (in microtime) 'word' => CAPTCHA WORD ) The "imag...
Once loaded you can generate a captcha like this: $vals = array( 'word' => 'Random word', 'img_path' => './captcha/', 'img_url' => 'http://example.com/captcha/', 'font_path' => './path/to/fonts/texb.ttf', 'img_width' => '150', 'img_height'...
Here is an example of usage with a database. On the page where the CAPTCHA will be shown you'll have something like this: $this->load->helper('captcha'); $vals = array( 'img_path' => './captcha/', 'img_url' => 'http://example.com/captcha/' ); $cap = create_captc...

Page 1 of 1