rafalmasiarek/php-hcaptcha

PHP hCaptcha Component Library

v1.0.0 2020-05-19 21:51 UTC

This package is auto-updated.

Last update: 2025-06-20 10:14:15 UTC


README

PHP hCaptcha Component Library

I accidentally discovered that Cloudflare stop using reCaptch in favor of another hCaptcha solution, which I started using this too with hope they collect less data about us than Google does Cloudflare wrote an article about it : Moving from reCAPTCHA to hCaptcha

Basic usage on backend validator:

<?php

$privToken = '';
$hcaptcha = new rafalmasiarek\hCaptcha($privToken);
$verify   = $hcaptcha->verify($_POST['h-captcha-response'])
if( $verify['success'] == true) {
    echo "Legit request!";
}