| 1 | <?php |
||
| 10 | class CaptchaModel |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * Generates the captcha, "returns" a real image, this is why there is header('Content-type: image/jpeg') |
||
| 14 | * Note: This is a very special method, as this is echoes out binary data. |
||
| 15 | */ |
||
| 16 | public static function generateAndShowCaptcha() |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Checks if the entered captcha is the same like the one from the rendered image which has been saved in session |
||
| 35 | * @param $captcha string The captcha characters |
||
| 36 | * @return bool success of captcha check |
||
| 37 | */ |
||
| 38 | public static function checkCaptcha($captcha) |
||
| 46 | } |
||
| 47 |