PHPackages                             neoan3-apps/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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. neoan3-apps/hcaptcha

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

neoan3-apps/hcaptcha
====================

hcaptcha PHP implementation

v1.1.0(5y ago)321351MITPHPCI failing

Since Oct 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/sroehrl/neoan3-hcapture)[ Packagist](https://packagist.org/packages/neoan3-apps/hcaptcha)[ RSS](/packages/neoan3-apps-hcaptcha/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (2)Versions (7)Used By (1)

PHP hcaptcha
============

[](#php-hcaptcha)

[![Build Status](https://camo.githubusercontent.com/79c071b789f6e2adf886b94d881fff4ddd5f5092261d9fd6c74119bf3c77ef63/68747470733a2f2f7472617669732d63692e636f6d2f73726f6568726c2f6e656f616e332d68636170747572652e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/sroehrl/neoan3-hcapture)[![Maintainability](https://camo.githubusercontent.com/859b458b0b3782dfaaafc74e354181cfaf4beae010229246936958bcd3d37854/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66643834323563613462386432643863623263612f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/sroehrl/neoan3-hcapture/maintainability)[![Test Coverage](https://camo.githubusercontent.com/0c34f0fc69ffb8b68fb2f0920d4fa047314399f7e4ec019e6c992e086c887d18/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f66643834323563613462386432643863623263612f746573745f636f766572616765)](https://codeclimate.com/github/sroehrl/neoan3-hcapture/test_coverage)

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

---

⚠️ I'm not affiliated in any way with hCaptcha ⚠️

---

Easy integration of [hCaptcha](https://hCaptcha.com/?r=20737c4f354f), a service that

- Keeps bots out;
- Earns you money;
- Is privacy conscious.

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 neoan3-apps/hcaptcha`
4. Set up your **front end** as:

```

        ...

        ...

```

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

```
   \Neoan3\Apps\Hcapture::setEnvironment([
       'siteKey' => 'your-sitekey',
       'secret' => 'your-secret',
       'apiKey' => 'your-api-key'
   ]);
   if(isset($_POST['my-form']) && \Neoan3\Apps\Hcapture::isHuman())
   {
       ... do stuff
   }
```

hCapture neoan3 API
-------------------

[](#hcapture-neoan3-api)

Here are some methods for you to use and setup hCaptcha in your project.

### Environment setup

[](#environment-setup)

For your global environment setup, please use the following methods:

```
// Set your own secret key
setSecret(string $value);

// API Key of hCaptcha linked to your account
setApiKey(string $value);

// Secret site key linked to your site
// See: https://docs.hcaptcha.com/api#addnewsitekey
setSiteKey(string $value);

// With an array of environment variables provided, set all of them
// This is a 'shortcut' for all three previous methods
setEnvironment(array $environmentVariables);
```

### hCaptcha utils

[](#hcaptcha-utils)

To retrieve hCaptcha information, here are the methods you will need:

```
// Check if the hCaptcha verification was successful
isHuman();

// Retrieve all statitics of the site corresponding to the
// provided variables (an error value is returned in case of
// invalid credentials)
stats();
```

Advanced setup
--------------

[](#advanced-setup)

You can have more details about advanced setup on [the configuration page](https://docs.hcaptcha.com/configuration) of the documentation.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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.

###  Release Activity

Cadence

Every ~150 days

Total

3

Last Release

2108d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92d2361b646651e3452a62d07274076346c4096480098a6c43d6c27ee28d460d?d=identicon)[neoan](/maintainers/neoan)

---

Top Contributors

[![sroehrl](https://avatars.githubusercontent.com/u/28542911?v=4)](https://github.com/sroehrl "sroehrl (12 commits)")[![pBouillon](https://avatars.githubusercontent.com/u/22640284?v=4)](https://github.com/pBouillon "pBouillon (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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