roquie/captcha

Captcha module for Kohana

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 57

Type:kohana-module

dev-master 2013-11-15 10:46 UTC

This package is auto-updated.

Last update: 2024-10-24 04:33:12 UTC


README

#Captcha for Kohana 3.x

This is the Captcha library ported from Kohana 2.3.x to 3.x. Very little has changed API-wise, although there have been a few changes.

##Getting Started

Instantiate a captcha:

$captcha = Captcha::instance();

Instantiate using your own config group (other than 'default'):

$captcha = Captcha::instance('myconfig');

Render a captcha:

$captcha->render();

or just:

$captcha;

Validate the captcha:

Captcha::valid($_POST['captcha']);

By default image-based captchas are rendered with HTML, the HTML is a very simple tag. If you want to handle your own rendering of the captcha simply set the first parameter for render() to FALSE:

$captcha->render(FALSE);

##Captcha Styles

  • alpha
  • basic
  • black
  • math
  • riddle
  • word