https://github.com/kiddivouchers/hcaptcha
PHP hCaptcha library
https://github.com/kiddivouchers/hcaptcha
library php
Last synced: 3 months ago
JSON representation
PHP hCaptcha library
- Host: GitHub
- URL: https://github.com/kiddivouchers/hcaptcha
- Owner: kiddivouchers
- License: mit
- Created: 2024-08-13T11:00:13.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-01-07T08:37:07.000Z (6 months ago)
- Last Synced: 2026-01-14T13:57:10.132Z (6 months ago)
- Topics: library, php
- Language: PHP
- Homepage:
- Size: 166 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
hCaptcha API Client
===================
Usage
-----
### Basic
With `php-http/discovery` installed this package will be leveraged to attempt to
use the most appropriate implementations of [PSR-7][] and [PSR-18][].
```sh
composer require widerplan/hcaptcha php-http/discovery
```
```php
verify($_POST['h-captcha-response'], getenv('HCAPTCHA_SITE_KEY'));
if ($result->success) {
// Perform protected action...
}
```
### With custom components
Instead of relying on the automatic discovery you can wire up your chosen implementations.
```sh
composer require widerplan/hcaptcha symfony/http-client slim/psr7
```
```php
verify($_POST['h-captcha-response'], getenv('HCAPTCHA_SITE_KEY'));
if ($result->success) {
// Perform protected action...
}
```
[PSR-7]: https://www.php-fig.org/psr/psr-7/
[PSR-18]: https://www.php-fig.org/psr/psr-18/