PHP Classes

CodeIgniter ReCaptcha plugin: Perform validation using Recaptcha in CodeIgniter

Recommend this page to a friend!
  Info   Documentation   Demos   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 107 All time: 9,683 This week: 455Up
Version License PHP version Categories
ci-google-recaptcha 1.0.0The PHP License5PHP 5, Libraries, Validation, Security
Collaborate with this project 

Author

Description

This package can perform validation using Recaptcha in CodeIgniter forms.

It generates HTML and JavaScript to embed Google Recapctha widget to validate real human users on a Web page form generated by CodeIgniter.

It only requires configuring the Recaptcha client and server secret.

Picture of Eray Akartuna
  Performance   Level  
Name: Eray Akartuna <contact>
Classes: 2 packages by
Country: Turkey Turkey
Age: 29
All time rank: 322954 in Turkey Turkey
Week rank: 170 Up2 in Turkey Turkey Up

Documentation

Codeigniter-Google-ReCaptcha

Codeigniter-Google-ReCaptcha uses Codeigniter Form Validation.You just need to edit your config and form view.You don't need to write any extra codes.A simple Google ReCaptcha implementation for CodeIgniter - Easy installation - Write Less Code With 2 Steps

Demo

Demo Page

alt tag

Usage

You can easily implement "Google ReCaptcha" to your forms with 2 Steps.You don't need to write any extra codes on the controller for Google ReCaptcha validation.Just use codeigniter validation library.

Code Sample

Controller

$this->load->library('form_validation');
$validation_rules = array(); // If you have another form rules you can define
$this->form_validation->set_rules($validation_rules);
if($this->form_validation->run()){
	exit("Form validated");
}

Installation Step-1

Open the "config/gcaptcha" file and write to "gcaptcha_server_secret" and "gcaptcha_client_secret" codes.

/*
|--------------------------------------------------------------------------
| Google Captcha Server Secret Code
|--------------------------------------------------------------------------
*/
$config['gcaptcha_server_secret'] = '';

/*
|--------------------------------------------------------------------------
| Google Captcha Client Secret Code
|--------------------------------------------------------------------------
*/
$config['gcaptcha_client_secret'] = '';

Installation Step-2

Put these codes into the your html forms.

<?php echo create_gcaptcha();?>
<span class="error"><?php echo gcaptcha_error();?></span>


  Files folder image Files (9)  
File Role Description
Files folder imageapplication (6 directories)
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (9)  /  application  
File Role Description
Files folder imageconfig (1 file)
Files folder imagecontrollers (2 files)
Files folder imagehelpers (1 file)
Files folder imagelanguage (1 directory)
Files folder imagelibraries (1 file)
Files folder imageviews (2 files)

  Files folder image Files (9)  /  application  /  config  
File Role Description
  Accessible without login Plain text file gcaptcha.php Aux. Auxiliary script

  Files folder image Files (9)  /  application  /  controllers  
File Role Description
  Plain text file Example.php Class Class source
  Plain text file Welcome.php Class Class source

  Files folder image Files (9)  /  application  /  helpers  
File Role Description
  Accessible without login Plain text file gcaptcha_helper.php Aux. Auxiliary script

  Files folder image Files (9)  /  application  /  language  
File Role Description
Files folder imageenglish (1 file)

  Files folder image Files (9)  /  application  /  language  /  english  
File Role Description
  Accessible without login Plain text file gcaptcha_form_validation_lang.php Aux. Auxiliary script

  Files folder image Files (9)  /  application  /  libraries  
File Role Description
  Plain text file MY_Form_validation.php Class Class source

  Files folder image Files (9)  /  application  /  views  
File Role Description
  Accessible without login Plain text file gcaptcha_example.php Aux. Auxiliary script
  Accessible without login Plain text file welcome_message.php Aux. Auxiliary script

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:107
This week:0
All time:9,683
This week:455Up