Captcha for Kohana

0 votes
593 views
asked Aug 23, 2016 in Kohana by Justin
Captcha for Kohana 3X ?

Is there one which can be used and plugged easily? a good one or recaptha would be nice.

1 Answer

0 votes
answered Aug 23, 2016 by Sardar

https://github.com/kolanos/kohana-captcha

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

Related questions

0 votes
1 answer 517 views
asked Aug 23, 2016 in Kohana by James
0 votes
1 answer 374 views
0 votes
1 answer 512 views
+1 vote
1 answer 166 views
0 votes
0 answers 180 views
asked Feb 13 in Laravel by Simply
0 votes
2 answers 737 views
asked Oct 27, 2016 in Modules by Octavia
...