Functions

Get code to do an AJAX check of the CAPTCHA.

captcha_ajax_check() : string

Returns

stringJavascript code.

Outputs and stores information for a CAPTCHA.

captcha_script() 

Checks a CAPTCHA.

check_captcha(string $code_entered, boolean $regenerate_on_error) : boolean

Parameters

$code_entered

string

CAPTCHA entered.

$regenerate_on_error

boolean

Whether to possibly regenerate upon error.

Returns

booleanWhether it is valid for the current session.

Calling this assumes captcha was needed.

enforce_captcha(boolean $regenerate_on_error) 

Checks that it was done correctly.

Parameters

$regenerate_on_error

boolean

Whether to possibly regenerate upon error.

Get a captcha (aka security code) form field.

form_input_captcha() : \tempcode

Returns

\tempcodeThe field

Generate a CAPTCHA image.

generate_captcha() 

Standard code module initialisation function.

init__captcha() 

Find whether captcha (the security image) should be used if preferred (making this call assumes it is preferred).

use_captcha() : boolean

Returns

booleanWhether captcha is used