Download the PHP package elioair/chesscaptcha without Composer

On this page you can find all versions of the php package elioair/chesscaptcha. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package chesscaptcha

Chess Captcha

Requirements: php >= 5.4, jquery > 1.8 | Latest Version 2.0.2

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.

:books: Laravel + Chesscaptcha Tutorial here.

:books: Chess captcha + Emojis here.

Created by @elioair | twitter: @elioair

Libraries used:

Implementation:

Through Composer

After composer finishes importing the package:

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 HTML

The javascript + js options object

Add this at the end and configure it if you want ajax validation

Validation

Grab the chesscaptchaposition from the POST request and feed it into the validation method. $validate = \ChessCaptcha\ChessCaptcha::validate($inputFen, $noJs, $colorTolerance); see the src/chesscaptchavalidate.php file for more.

Further Configuration:

Look into the boardimagecreator.php for settings on the image.

Issues

TODO

FAQ

1. How do I change the positions displayed?

Edit the array $givenFen in src/fengenerator.php for the simple mode and the $givenMateInOne for the mate mode.

2. Pieces are not showing up or no board image is shown.

Make sure that you have the paths to the image files of the pieces right. E.g. $pieceImageDir property in boardimagecreator.php and $config['$pieceImageDir'].

3. How do I make the check ignore the piece color?

Pass true as the third argument of the Chesscaptcha::validate method to make the comparison color agnostic.

License

Distributed under the MIT license


All versions of chesscaptcha with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package elioair/chesscaptcha contains the following files

Loading the files please wait ....