PHPackages                             sadegh-pm/recapcha - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. sadegh-pm/recapcha

ActiveLibrary[HTTP &amp; Networking](/categories/http)

sadegh-pm/recapcha
==================

PSR-7 Google reCAPCHA Middleware

v1.0(9y ago)13145MITPHPPHP &gt;=5.5.0

Since Feb 25Pushed 9y ago1 watchersCompare

[ Source](https://github.com/SadeghPM/reCAPCHA)[ Packagist](https://packagist.org/packages/sadegh-pm/recapcha)[ Docs](https://github.com/SadeghPM/reCAPCHA)[ RSS](/packages/sadegh-pm-recapcha/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PSR-7 Google reCAPCHA Middleware
================================

[](#psr-7-google-recapcha-middleware)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)
This middleware implement server side google reCAPCHA v2 validation.It was originally developed for Slimframework 3 but can be used with any framework using PSR-7 style middlewares. It is very simple and without any dependancy.

Install
-------

[](#install)

Install latest version using [composer](https://getcomposer.org/).

```
$ composer require sadegh-pm/recapcha
```

Usage
-----

[](#usage)

Add the middleware in the route that you rendering the reCAPTCHA widget. for example i inserted reCAPTCHA widget in the `/login` route:

```
  $app->post('/login', App\Api\Login::class . ':verify')
      ->add( new \SadeghPM\Recapcha\GoogleReCapcha($reCAPCHA_Secret) );
```

if google reCAPCHA verifying the user's response , your route will be resolved otherwise app will be terminate.the terminated response status code is `403` and body is a json:

```
{
  "ok":false,
  "description":"errors..."
}
```

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3411d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0ecb8440161efaed64e53693c2e1de411dfef84f383585392adc01b5b62e143c?d=identicon)[SadeghPM](/maintainers/SadeghPM)

---

Top Contributors

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

---

Tags

middlewarephppsr-7recaptchaslim3slimframeworkpsr-7middlewareslimframeworkrecapcha

### Embed Badge

![Health badge](/badges/sadegh-pm-recapcha/health.svg)

```
[![Health](https://phpackages.com/badges/sadegh-pm-recapcha/health.svg)](https://phpackages.com/packages/sadegh-pm-recapcha)
```

###  Alternatives

[league/uri

URI manipulation library

1.1k228.3M364](/packages/league-uri)[psr/http-server-middleware

Common interface for HTTP server-side middleware

18499.3M1.8k](/packages/psr-http-server-middleware)[mezzio/mezzio

PSR-15 Middleware Microframework

3913.8M120](/packages/mezzio-mezzio)[relay/relay

A PSR-15 server request handler.

3302.2M95](/packages/relay-relay)[tuupola/cors-middleware

PSR-7 and PSR-15 CORS middleware

1331.9M29](/packages/tuupola-cors-middleware)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

577.0M95](/packages/laminas-laminas-stratigility)

PHPackages © 2026

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