iorme/simplecaptcha

Create simple captcha using php

Installs: 2 375

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 1

pkg:composer/iorme/simplecaptcha

v0.1 2014-06-17 14:17 UTC

This package is not auto-updated.

Last update: 2025-10-21 09:46:09 UTC


README

Simple PHP captcha generator for Laravel 4

Installation

composer.json

"require": {
		"iorme/simplecaptcha": "dev-master"
	},

install

$ /path/to/composer.phar install

Usage

Add the service provider, open app/config/app.php and add new item to the providers array :

'Iorme\SimpleCaptcha\SimpleCaptchaServiceProvider',

then add the alias to the aliases array:

'SimpleCaptcha' => 'Iorme\SimpleCaptcha\Facades\SimpleCaptcha',

On the view file :

<p>
    {{ HTML::image(URL::to('simplecaptcha'),'Captcha') }}
    {{ Form::label('captcha', '* Captcha:') }}
    {{ Form::text('captcha') }}
</p>

check the captcha string on the controllers :

$check = SimpleCaptcha::check($input['captcha']);

if($check == true) {
	echo "captcha string is right";
} else {
	echo "captcha string is wrong";
}