phpBB API Documentation
Class

phpbb_recaptcha

class phpbb_recaptcha extends phpbb_default_captcha

Properties

$confirm_id
$confirm_code
$code
$seed
$attempts
$type
$solved
$captcha_vars
$recaptcha_server
$recaptcha_server_secure
$recaptcha_verify_server
$recaptcha_verify_path
$challenge
$response

Methods

init($type)

execute_demo()

execute()

get_template()

get_demo_template($id)

get_hidden_fields()

garbage_collect($type)

from phpbb_default_captcha
uninstall()

install()

validate()

generate_code()

The old way to generate code, suitable for GD and non-GD.

from phpbb_default_captcha
regenerate_code()

New Question, if desired.

from phpbb_default_captcha
new_attempt()

New Question, if desired.

from phpbb_default_captcha
load_code()

Look up everything we need for painting&checking.

from phpbb_default_captcha
check_code()

from phpbb_default_captcha
delete_code()

from phpbb_default_captcha
get_attempt_count()

from phpbb_default_captcha
reset()

from phpbb_default_captcha
is_solved()

from phpbb_default_captcha
has_config()

API function

phpbb_recaptcha()

get_instance()

is_available()

get_name()

get_class_name()

acp_page($id, $module)

array _recaptcha_http_post(string $host, string $path, array $data, int $port = 80)

Submits an HTTP POST to a reCAPTCHA server

ReCaptchaResponse recaptcha_check_answer(array $extra_params = array())

Calls an HTTP POST function to verify if the user's guess was correct

string _recaptcha_qsencode($data $data)

Encodes the given data into a query string format

Details

at line 47
public init($type)

Parameters

$type

at line 141
public execute_demo()

at line 146
public execute()

at line 150
public get_template()

at line 176
public get_demo_template($id)

Parameters

$id

at line 181
public get_hidden_fields()

in phpbb_default_captcha at line 152
public garbage_collect($type)

Parameters

$type

at line 194
public uninstall()

at line 199
public install()

at line 204
public validate()

in phpbb_default_captcha at line 234
public generate_code()

The old way to generate code, suitable for GD and non-GD.

Resets the internal state.

in phpbb_default_captcha at line 258
public regenerate_code()

New Question, if desired.

in phpbb_default_captcha at line 280
public new_attempt()

New Question, if desired.

in phpbb_default_captcha at line 303
public load_code()

Look up everything we need for painting&checking.

in phpbb_default_captcha at line 327
public check_code()

in phpbb_default_captcha at line 332
public delete_code()

in phpbb_default_captcha at line 343
public get_attempt_count()

in phpbb_default_captcha at line 348
public reset()

in phpbb_default_captcha at line 361
public is_solved()

at line 73
public has_config()

API function

at line 42
public phpbb_recaptcha()

at line 57
public get_instance()

at line 63
public is_available()

at line 78
public get_name()

at line 83
public get_class_name()

at line 88
public acp_page($id, $module)

Parameters

$id
$module

at line 258
public array _recaptcha_http_post(string $host, string $path, array $data, int $port = 80)

Submits an HTTP POST to a reCAPTCHA server

Parameters

string $host
string $path
array $data
int $port port

Return Value

array response

at line 294
public ReCaptchaResponse recaptcha_check_answer(array $extra_params = array())

Calls an HTTP POST function to verify if the user's guess was correct

Parameters

array $extra_params an array of extra variables to post to the server

Return Value

ReCaptchaResponse

at line 331
public string _recaptcha_qsencode($data $data)

Encodes the given data into a query string format

Parameters

$data $data
  • array of string elements to be encoded

Return Value

string
  • encoded request