Recaptcha Plugin Based on the official recaptcha library( https://packagist.org/packages/google/recaptcha )
- Depuis
- 2.5
◆ _getLanguage()
Get the language tag or a custom translation
- Renvoie
- string
- Depuis
- 2.5
Références $language.
◆ _recaptcha_http_post()
_recaptcha_http_post |
( |
|
$host, |
|
|
|
$path, |
|
|
|
$data, |
|
|
|
$port = 80 |
|
) |
| |
|
private |
Submits an HTTP POST to a reCAPTCHA server.
- Paramètres
-
string | $host | Host name to POST to. |
string | $path | Path on host to POST to. |
array | $data | Data to be POSTed. |
int | $port | Optional port number on host. |
- Renvoie
- array Response
- Depuis
- 2.5
Références $data.
◆ _recaptcha_qsencode()
_recaptcha_qsencode |
( |
|
$data | ) |
|
|
private |
Encodes the given data into a query string format.
- Paramètres
-
array | $data | Array of string elements to be encoded |
- Renvoie
- string Encoded request
- Depuis
- 2.5
Références $data, $key, et $value.
◆ getResponse()
getResponse |
( |
|
$privatekey, |
|
|
|
$remoteip, |
|
|
|
$response, |
|
|
|
$challenge = null |
|
) |
| |
|
private |
Get the reCaptcha response.
- Paramètres
-
string | $privatekey | The private key for authentication. |
string | $remoteip | The remote IP of the visitor. |
string | $response | The response received from Google. |
string | $challenge | The challenge field from the reCaptcha. Only for 1.0 |
- Renvoie
- bool True if response is good | False if response is bad.
- Depuis
- 3.4
- Exceptions
-
Références $version.
◆ onCheckAnswer()
onCheckAnswer |
( |
|
$code = null | ) |
|
Calls an HTTP POST function to verify if the user's guess was correct
- Paramètres
-
string | $code | Answer provided by user. Not needed for the Recaptcha implementation |
- Renvoie
- True if the answer is correct, false otherwise
- Depuis
- 2.5
- Exceptions
-
Références $input, $version, et null.
◆ onDisplay()
onDisplay |
( |
|
$name = null , |
|
|
|
$id = 'dynamic_recaptcha_1' , |
|
|
|
$class = '' |
|
) |
| |
Gets the challenge HTML
- Paramètres
-
string | $name | The name of the field. Not Used. |
string | $id | The id of the field. |
string | $class | The class of the field. |
- Renvoie
- string The HTML to be embedded in the form.
- Depuis
- 2.5
Références $class, et $id.
◆ onInit()
onInit |
( |
|
$id = 'dynamic_recaptcha_1' | ) |
|
Initialise the captcha
- Paramètres
-
string | $id | The id of the field. |
- Renvoie
- Boolean True on success, false otherwise
- Depuis
- 2.5
- Exceptions
-
Références $file, $id, et getDocument.
◆ onPrivacyCollectAdminCapabilities()
onPrivacyCollectAdminCapabilities |
( |
| ) |
|
Reports the privacy related capabilities for this plugin to site administrators.
- Renvoie
- array
- Depuis
- 3.9.0
◆ $autoloadLanguage
La documentation de cette classe a été générée à partir du fichier suivant :