fidyk/captcha

A captcha module for Kohana

Installs: 107

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 57

Type:kohana-module

dev-3.3/master 2014-03-13 12:56 UTC

This package is not auto-updated.

Last update: 2024-05-11 13:46:57 UTC


README

#Captcha for Kohana 3.3

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

One significant change is that filenames are now Title Case to conform with the PSR-0 standard adopted in Kohana 3.3.

##Getting Started

Instantiate a captcha:

$captcha = Captcha::instance();

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

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

Render a captcha to Response object (somewhere in the controller action):

$captcha->render($this->response);

or render captcha to HTML tag or plain text string (for 'math' and 'riddle' styles):

$captcha->html();

Validate the captcha:

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

##Captcha Styles

  • alpha - Image based
  • basic - Image based
  • black - Image based
  • math - Text based
  • riddle - Text based
  • word - Image based