Skip to content

Files

Latest commit

 

History

History
36 lines (26 loc) · 647 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 647 Bytes

PHP HCaptcha

Server side verification package

Quick Start

  1. Require Package
composer require neverbehave/hcaptcha
  1. Create an instance
$hcaptcha = new neverbehave\Hcaptcha('Your API KEY');

// Generate Challenge
// Instance of HcaptchaResponse
$client_challenge1 = $hcaptcha->challenge('Response');
$client_challenge2 = $hcaptcha->challenge('Another Response', 'Client IP');

// Read Result
if ($client_challenge1->isSuccess()) {
    // Do Something
} else {
    // Read Error
    $client_challenge1->getErrors();
}

// Get Raw Response 
$client_challenge2->getRaw();

Reference

https://docs.hcaptcha.com/