PHP Класс CaptchaModel, huge

Наследование: extends Model
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
checkCaptcha ( $captcha ) : boolean Checks if the entered captcha is the same like the one from the rendered image which has been saved in session
generateAndShowCaptcha ( ) Generates the captcha, "returns" a real image, this is why there is header('Content-type: image/jpeg') Note: This is a very special method, as this is echoes out binary data.

Описание методов

checkCaptcha() публичный статический Метод

Checks if the entered captcha is the same like the one from the rendered image which has been saved in session
public static checkCaptcha ( $captcha ) : boolean
$captcha string The captcha characters
Результат boolean success of captcha check

generateAndShowCaptcha() публичный статический Метод

Generates the captcha, "returns" a real image, this is why there is header('Content-type: image/jpeg') Note: This is a very special method, as this is echoes out binary data.
public static generateAndShowCaptcha ( )