Captcha Instance

Simple Captcha Implementation.


hCaptcha

Implementation hCaptcha instance.

$captcha = new \Samy\Captcha\hCaptcha($secretkey);

withSiteKey

Return an instance with provided site key.

$captcha = $captcha->withSiteKey($sitekey);

withRemoteIP

Return an instance with provided remote ip.

$captcha = $captcha->withRemoteIP($remote_ip);

withCaptchaResponse

Return an instance with provided captcha response.

In case you do not use the h-captcha-response POST parameter to retrieve the token on your server, then you need to tell the instance classes manually.

$captcha = $captcha->withCaptchaResponse($captcha_response);