PHPackages                             pablosanches/hcaptcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. pablosanches/hcaptcha

ActiveLibrary

pablosanches/hcaptcha
=====================

A simple wrapper for hCaptcha

401PHP

Since Sep 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pablosanches/hcaptcha)[ Packagist](https://packagist.org/packages/pablosanches/hcaptcha)[ RSS](/packages/pablosanches-hcaptcha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

hCaptcha Wrapper
================

[](#hcaptcha-wrapper)

[![hcaptcha header](https://camo.githubusercontent.com/d9b1d5f1d7cb3dbbab0bfe40eaa1ecf09b92568a8074325de2c298dfe810531a/68747470733a2f2f6173736574732d676c6f62616c2e776562736974652d66696c65732e636f6d2f3563373365376561336638626232613835643237383164622f3563373638353131353662373465353361623862326132375f686361707468612d6c6f676f2d77686974652e737667)](https://camo.githubusercontent.com/d9b1d5f1d7cb3dbbab0bfe40eaa1ecf09b92568a8074325de2c298dfe810531a/68747470733a2f2f6173736574732d676c6f62616c2e776562736974652d66696c65732e636f6d2f3563373365376561336638626232613835643237383164622f3563373638353131353662373465353361623862326132375f686361707468612d6c6f676f2d77686974652e737667)

Quick start
-----------

[](#quick-start)

1. Sign up at [hCaptcha](https://hCaptcha.com/?r=20737c4f354f).
2. Fetch your public key and site key from the [settings](https://dashboard.hcaptcha.com/settings) tab.
3. Get this package `composer require pablosanches/hcaptcha`
4. Set up your **front end** as:

```

        ...

        ...

```

5. Now in your PHP **back end**:

```
    require('../vendor/autoload.php');
    use PabloSanches\hCaptcha;

    $hCaptcha = new hCaptcha('your-secret-key');
    $hCaptchaResult = $hCaptcha->challenge($_POST['h-captcha-response']);
    $isHuman = $hCaptchaResult->isHuman(); // True or False

    if (!$isHuman) {
        $errors = $hCaptchaResult->getErrors(); // An array with all errors
    }
```

Enjoy it ;)

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity28

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1846624?v=4)[Pablo Sanches](/maintainers/pablosanches)[@pablosanches](https://github.com/pablosanches)

---

Top Contributors

[![pablosanches](https://avatars.githubusercontent.com/u/1846624?v=4)](https://github.com/pablosanches "pablosanches (4 commits)")

### Embed Badge

![Health badge](/badges/pablosanches-hcaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/pablosanches-hcaptcha/health.svg)](https://phpackages.com/packages/pablosanches-hcaptcha)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
