class vB_HumanVerify_Recaptcha2 extends vB_HumanVerify_Abstract

Human Verification class for reCAPTCHA Verification (http://recaptcha.net)

Properties

protected string $error Error string from vB_HumanVerify_Abstract
protected string $hash Last generated hash from vB_HumanVerify_Abstract

Methods

boolean
delete_token(string $hash, string $answer = NULL, integer $viewed = NULL)

Deleted a Human Verification Token

array
generate_token(boolean $deletehash = true)

generate token - Normally we want to generate a token to validate against. However, Recaptcha is doing that work for us.

boolean
verify_token(array $input)

Verify is supplied token/reponse is valid

mixed
fetch_error()

Returns any errors that occurred within the class

mixed
fetch_answer()

expected answer - with this class, we don't know the answer

Details

protected boolean delete_token(string $hash, string $answer = NULL, integer $viewed = NULL)

Deleted a Human Verification Token

Parameters

string $hash The hash to delete
string $answer The Corresponding Option
integer $viewed Whether the token has been viewd

Return Value

boolean Was anything deleted?

at line 104
array generate_token(boolean $deletehash = true)

generate token - Normally we want to generate a token to validate against. However, Recaptcha is doing that work for us.

Parameters

boolean $deletehash Delete the previous hash generated

Return Value

array an array consisting of the hash, and the answer

at line 30
boolean verify_token(array $input)

Verify is supplied token/reponse is valid

Parameters

array $input An array consisting of the hash, and the inputted answer

Return Value

boolean

mixed fetch_error()

Returns any errors that occurred within the class

Return Value

mixed

at line 91
protected mixed fetch_answer()

expected answer - with this class, we don't know the answer

Return Value

mixed