PHPackages                             phpdevsr/recaptcha-codeigniter4 - 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. [Security](/categories/security)
4. /
5. phpdevsr/recaptcha-codeigniter4

ActiveLibrary[Security](/categories/security)

phpdevsr/recaptcha-codeigniter4
===============================

Free to Use Library reCAPTCHA v2 for Codeigniter 4

2.1.1(2y ago)101.9k↓33.3%4[1 PRs](https://github.com/PHPDevsr/reCaptcha-Codeigniter4/pulls)MITPHPPHP ^7.4 || ^8.0

Since Nov 28Pushed 1y agoCompare

[ Source](https://github.com/PHPDevsr/reCaptcha-Codeigniter4)[ Packagist](https://packagist.org/packages/phpdevsr/recaptcha-codeigniter4)[ Docs](https://github.com/PHPDevsr/reCaptcha-Codeigniter4)[ Fund](https://paypal.me/hexageek1337)[ GitHub Sponsors](https://github.com/ddevsr)[ RSS](/packages/phpdevsr-recaptcha-codeigniter4/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelog (7)Dependencies (8)Versions (10)Used By (0)

[![PHPUnit](https://github.com/PHPDevsr/reCaptcha-Codeigniter4/workflows/PHPUnit/badge.svg)](https://github.com/PHPDevsr/reCaptcha-Codeigniter4/actions/workflows/test-phpunit.yml)[![PHPStan](https://github.com/PHPDevsr/reCaptcha-Codeigniter4/actions/workflows/test-phpstan.yml/badge.svg)](https://github.com/PHPDevsr/reCaptcha-Codeigniter4/actions/workflows/test-phpstan.yml)[![Coverage Status](https://camo.githubusercontent.com/9730225b32117c48f19c87eec8483f790c999935dfcd38a38ea1f938e671021d/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f50485044657673722f7265436170746368612d436f646569676e69746572342f62616467652e7376673f6272616e63683d646576)](https://coveralls.io/github/PHPDevsr/reCaptcha-Codeigniter4?branch=dev)[![Downloads](https://camo.githubusercontent.com/72c7ac8d43ea19fc011b89ad3814369a44bf5ada7c585b17ed1d822438fe98aa/68747470733a2f2f706f7365722e707567782e6f72672f70687064657673722f7265636170746368612d636f646569676e69746572342f646f776e6c6f616473)](https://packagist.org/packages/phpdevsr/recaptcha-codeigniter4)[![GitHub release (latest by date)](https://camo.githubusercontent.com/3e75c4320189ed3e21687697dfdc81604eb8fbe5f7b2545159f2f27a3fa2f54e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f50485044657673722f7265436170746368612d436f646569676e6974657234)](https://packagist.org/packages/phpdevsr/recaptcha-codeigniter4)[![GitHub stars](https://camo.githubusercontent.com/b04b021e51393ca499420fe7796816286ff1a894bb0be65c23ccfd5915faa81e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f50485044657673722f7265436170746368612d436f646569676e6974657234)](https://packagist.org/packages/phpdevsr/recaptcha-codeigniter4)[![GitHub license](https://camo.githubusercontent.com/366a327a050fcb924330c83252a076deaf1caed2eb75e1e39ffc462e3856a2a4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f50485044657673722f7265436170746368612d436f646569676e6974657234)](https://github.com/PHPDevsr/reCaptcha-Codeigniter4/blob/dev/LICENSE)

reCAPTCHA Codeigniter 4
=======================

[](#recaptcha-codeigniter-4)

Free to Use Library reCAPTCHA v2 for Codeigniter 4.

What is reCAPTCHA?
==================

[](#what-is-recaptcha)

reCAPTCHA is a free service that protects your site from spam and abuse. It uses advanced risk analysis engine to tell humans and bots apart. With the new API, a significant number of your valid human users will pass the reCAPTCHA challenge without having to solve a CAPTCHA (See blog for more details). reCAPTCHA comes in the form of a widget that you can easily add to your blog, forum, registration form, etc.

See [the details](https://www.google.com/recaptcha/intro/index.html).

Sign up for an API key pair
===========================

[](#sign-up-for-an-api-key-pair)

To use reCAPTCHA, you need to [sign up for an API key pair](http://www.google.com/recaptcha/admin) for your site. The key pair consists of a site key and secret. The site key is used to display the widget on your site. The secret authorizes communication between your application backend and the reCAPTCHA server to verify the user's response. The secret needs to be kept safe for security purposes.

Installation
============

[](#installation)

install with composer

```
$ composer require phpdevsr/recaptcha-codeigniter4
$ php spark config:publish
```

Usage
=====

[](#usage)

Since `v2.1.0`, environment config can be use for multiple config with `.env`

```
recaptcha.recaptchaSiteKey
recaptcha.recaptchaSecretKey
recaptcha.recaptchaLang
```

Initialization
--------------

[](#initialization)

```
