PHPackages                             elioair/chesscaptcha - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. elioair/chesscaptcha

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

elioair/chesscaptcha
====================

A simple chess based captcha system.

2.0.2(10y ago)53385MITJavaScriptPHP &gt;=5.4

Since Nov 1Pushed 10y ago4 watchersCompare

[ Source](https://github.com/elioair/chesscaptcha)[ Packagist](https://packagist.org/packages/elioair/chesscaptcha)[ Docs](http://elioair.github.io/chesscaptcha/)[ RSS](/packages/elioair-chesscaptcha/feed)WikiDiscussions master Synced 1mo ago

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

Chess Captcha
=============

[](#chess-captcha)

##### Requirements: php &gt;= 5.4, jquery &gt; 1.8 | Latest Version 2.0.2

[](#requirements-php--54-jquery--18--latest-version-202)

This is a captcha system where the user either recreates the position of the pieces on the board - *non chess savvy users* - or she solves a mate-in-one puzzle by putting the piece on the square where it gives the checkmate - *chess savvy users only*. There is also a no js fallback that exists mostly as a placeholder for future iterations; don't use it. Chesscaptcha was built for fun, it is a work in progress so feel free to make pull requests and contribute!

**View demo [here](http://elioair.github.io/chesscaptcha/).**

📚 **Laravel + Chesscaptcha Tutorial [here](http://dev.emar.gr/blog/laravel-5-chess-captcha-authentication).**

📚 **Chess captcha + Emojis [here](http://dev.emar.gr/blog/emojis-used-in-chesscaptcha).**

Created by @elioair | twitter: [@elioair](http://twitter.com/elioair)

##### Libraries used:

[](#libraries-used)

- [chessboardjs](http://chessboardjs.com/)
- [ChessImager](https://code.google.com/p/chessimager/)
- [Jquery](http://jquery.com)

Implementation:
===============

[](#implementation)

#### Through Composer

[](#through-composer)

```
composer require elioair/chesscaptcha

```

After composer finishes importing the package:

- You may remove the `/vendor/elioair/chesscaptcha/examples` directory
- Place the `/vendor/elioair/chesscaptcha/assets` directory or it's contents where it suits your project. **Note** that the image files are used both by the `js` client and the `php` server side.
- Fix the image paths in the `/vendor/elioair/chesscaptcha/src/ChessCaptcha/BoardImageCreator.php`

#### Directly cloning the repo

[](#directly-cloning-the-repo)

Clone the repository and see immediately how it works by going to the `/examples` folder. You might need to `require_once` the files of the classes involved in the class files in the `src/ChessCaptcha` folder.

*Quick tip: run `composer install` and then `composer dump-autoload --optimize` and include the loader.*

**Working Example:** `/examples/chesscaptcha-example.php`

### The php configuration

[](#the-php-configuration)

```
