PHP Class CaptchaModel, huge

Inheritance: extends Model
Show file Open project: panique/huge Class Usage Examples

Public Methods

Method Description
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.

Method Details

checkCaptcha() public static method

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
return boolean success of captcha check

generateAndShowCaptcha() public static method

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 ( )