Kohana Captcha module - securimage
Well...Maybe it's an unnecessary library in Kohana,but I still try to make it be module.
The original source from http://www.phpcaptcha.org/,so It's GNU LESSER GENERAL PUBLIC LICENSE
呃…或許這個模組在Kohana是多餘的,但是我還是把他做出來了= =,他一樣是用http://www.phpcaptcha.org/的原始碼修改的,所以授權一樣是LGPL
Usage Sample:
class Welcome_Controller extends Controller { public function __construct() { parent::__construct(); } public function index() { // Load Securimage library $this->securimage = new Securimage; // Form submitted if ($_POST) { $imageCode = $this->input->post('imageCode'); echo $this->securimage->getCode(); if ($this->securimage->check($imageCode)==true) { echo '<p style="color:green">Good answer!</p>'; } else { echo '<p style="color:red">Wrong answer!</p>'; } } // Show form echo form::open(); echo html::image('image/securimage',null,true); echo form::input('imageCode'); echo form::submit(array('value' => 'Check')); echo form::close(); } } // End Welcome Controller
Image Controller
class Image_Controller extends Controller { public function __construct() { parent::__construct(); } public function securimage() { $this->securimage = new Securimage; $this->securimage->show(); } }
Download:securimage module

2 Responses to “Kohana Captcha module - securimage”
I was going to implement securimage on my Kohana-run website and this really sped things up! Thank you so much!
ужос!!!
回應(Leave a Reply)