Tutorial by Examples: captcha

The class use Phalcon\Validation\Validator; use Phalcon\Validation\ValidatorInterface; use Phalcon\Validation\Message; class RecaptchaValidator extends Validator implements ValidatorInterface { public function validate(\Phalcon\Validation $validation, $attribute) { $value =...
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'...

Page 1 of 1