PHPackages                             afelicioni/codeigniter-recaptcha - 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. afelicioni/codeigniter-recaptcha

ActiveAfelicioni-codeigniter

afelicioni/codeigniter-recaptcha
================================

Recaptcha quick integration into CodeIgniter

0.1.0(10y ago)11862GPL-2.0PHPPHP &gt;=5.3.0

Since Mar 25Pushed 10y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

codeigniter-recaptcha
=====================

[](#codeigniter-recaptcha)

[![Latest Stable Version](https://camo.githubusercontent.com/68ff607f53a811751ccd7d42d7da30694b7826c7a62fb423ac8694e3d13da555/68747470733a2f2f706f7365722e707567782e6f72672f6166656c6963696f6e692f636f646569676e697465722d7265636170746368612f762f737461626c65)](https://packagist.org/packages/afelicioni/codeigniter-recaptcha) [![Total Downloads](https://camo.githubusercontent.com/23a365ef0823348ccc6b710f23240b0ce32cf2f143895287550b0fbfea591397/68747470733a2f2f706f7365722e707567782e6f72672f6166656c6963696f6e692f636f646569676e697465722d7265636170746368612f646f776e6c6f616473)](https://packagist.org/packages/afelicioni/codeigniter-recaptcha) [![Latest Unstable Version](https://camo.githubusercontent.com/b9167d0a5f7283cccf45ec325edf0b6df21a2ed92ace25562caa0d6184036389/68747470733a2f2f706f7365722e707567782e6f72672f6166656c6963696f6e692f636f646569676e697465722d7265636170746368612f762f756e737461626c65)](https://packagist.org/packages/afelicioni/codeigniter-recaptcha) [![License](https://camo.githubusercontent.com/de903b251cd9905c0b54cb290086d9b3926836453b759e2685fad4cb97283691/68747470733a2f2f706f7365722e707567782e6f72672f6166656c6963696f6e692f636f646569676e697465722d7265636170746368612f6c6963656e7365)](https://packagist.org/packages/afelicioni/codeigniter-recaptcha)

Little package to get [recaptcha](https://developers.google.com/recaptcha/intro) working on [codeigniter](http://www.codeigniter.com/)

prerequisites
-------------

[](#prerequisites)

Setup and obtain a key pair from [recaptcha admin console](https://www.google.com/recaptcha/admin) for your project domain; both are required. The firs is used on captcha widget rendering, the second when checking response validity.

It's also important to check the URL endpoint to be used for remote validation; the information is available under server side integration step.

setup
-----

[](#setup)

Copy `config/Recaptcha.php` and `libraries/Recaptcha.php` under codeigniter project application folder.

Please note that default shipped configuration is using test keys, so you have to replace them in `config/Recaptcha.php` with the ones coming from completion of previous step (and better to disable allowed test keys). The rows to edit are the following:

```
$config['allowtestkeys'] = TRUE;
$config['profile_sitekey'] = '6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI';
$config['profile_secretkey'] = '6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe';
```

According to [documentation](https://developers.google.com/recaptcha/docs/display), config variables can be mapped to customize widget, like theme, size, etc.

A way to install via composer is allowed referencing packagist handle [afelicioni/codeigniter-recaptcha](https://packagist.org/packages/afelicioni/codeigniter-recaptcha) like

```
{
	"require": {
		"afelicioni/codeigniter-recaptcha": "dev-master"
	}
}
```

in a custom composer.json and to be triggered by

```
composer install

```

At last, `controllers/Recaptcha.php` provides a direct usage example.

how to use
----------

[](#how-to-use)

Functionality is split in two parts, for widget rendering and response verification.

First, be sure to load library

```
$this->load->library('recaptcha');

```

In controller, call `widget` to obtain outputable code for displaying widget. You can (it's optional!) pass an array as parameter to customize language, theme, size and so on.

```
$this->recaptcha->widget(array('hl'=>'fr','theme'=>'dark','size'=>'compact'));

```

To verify response, call `verify` and pass a string to perfor check for.

```
$checkme = $this->recaptcha->verify($this->input->post('g-recaptcha-response'));
if ($check) {
	echo 'hey, you look like a human!';
}

```

todo
----

[](#todo)

Strict check for IP address

extra
-----

[](#extra)

by [Alessio Felicioni](http://www.alessiofelicioni.it/) | [Github](https://github.com/afelicioni)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

3697d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8f3b91e493af90d01e3ecdc0148896899bb64722a6c769d84d6b94549f2eb0fb?d=identicon)[afelicioni](/maintainers/afelicioni)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/afelicioni-codeigniter-recaptcha/health.svg)

```
[![Health](https://phpackages.com/badges/afelicioni-codeigniter-recaptcha/health.svg)](https://phpackages.com/packages/afelicioni-codeigniter-recaptcha)
```

PHPackages © 2026

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