You are here

public function RequestParameters::__construct in reCAPTCHA 8.2

Same name and namespace in other branches
  1. 6.2 recaptcha-php/src/ReCaptcha/RequestParameters.php \ReCaptcha\RequestParameters::__construct()
  2. 7.2 recaptcha-php/src/ReCaptcha/RequestParameters.php \ReCaptcha\RequestParameters::__construct()

Initialise parameters.

Parameters

string $secret Site secret.:

string $response Value from g-captcha-response form field.:

string $remoteIp User's IP address.:

string $version Version of this client library.:

File

recaptcha-php/src/ReCaptcha/RequestParameters.php, line 66

Class

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

Namespace

ReCaptcha

Code

public function __construct($secret, $response, $remoteIp = null, $version = null) {
  $this->secret = $secret;
  $this->response = $response;
  $this->remoteIp = $remoteIp;
  $this->version = $version;
}