Documentation

RequestParameters
in package

Stores and formats the parameters for the request to the reCAPTCHA service.

Table of Contents

Properties

$remoteIp  : string
Remote user's IP address.
$response  : string
The user response token provided by reCAPTCHA, verifying the user on your site.
$secret  : string
The shared key between your site and reCAPTCHA.
$version  : string
Client version.

Methods

__construct()  : mixed
Initialise parameters.
toArray()  : array<string|int, mixed>
Array representation.
toQueryString()  : string
Query string representation for HTTP request.

Properties

$response

The user response token provided by reCAPTCHA, verifying the user on your site.

private string $response

$secret

The shared key between your site and reCAPTCHA.

private string $secret

Methods

__construct()

Initialise parameters.

public __construct(string $secret, string $response[, string $remoteIp = null ][, string $version = null ]) : mixed
Parameters
$secret : string

Site secret.

$response : string

Value from g-captcha-response form field.

$remoteIp : string = null

User's IP address.

$version : string = null

Version of this client library.

toArray()

Array representation.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

Array formatted parameters.

toQueryString()

Query string representation for HTTP request.

public toQueryString() : string
Return values
string

Query string formatted parameters.


        
On this page

Search results