public function CurlPost::__construct in reCAPTCHA 8.2
Same name and namespace in other branches
- 6.2 recaptcha-php/src/ReCaptcha/RequestMethod/CurlPost.php \ReCaptcha\RequestMethod\CurlPost::__construct()
- 7.2 recaptcha-php/src/ReCaptcha/RequestMethod/CurlPost.php \ReCaptcha\RequestMethod\CurlPost::__construct()
Only needed if you want to override the defaults
Parameters
string $siteVerifyUrl URL for reCAPTCHA sitevrerify API:
File
- recaptcha-php/
src/ ReCaptcha/ RequestMethod/ CurlPost.php, line 58
Class
- CurlPost
- Sends cURL request to the reCAPTCHA service. Note: this requires the cURL extension to be enabled in PHP
Namespace
ReCaptcha\RequestMethodCode
public function __construct(Curl $curl = null, $siteVerifyUrl = null) {
$this->curl = is_null($curl) ? new Curl() : $curl;
$this->siteVerifyUrl = is_null($siteVerifyUrl) ? ReCaptcha::SITE_VERIFY_URL : $siteVerifyUrl;
}