Download the PHP package enovision/slim-captcha without Composer

On this page you can find all versions of the php package enovision/slim-captcha. 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 slim-captcha

Slim Captcha

This easy to use captcha package is based on the captcha helper from CodeIgniter (Ellislab).

Installing

Use Composer to install Slim Captcha into your project:

or clone it from github

Requirements

Usage With Slim 3

Requirements

Database table 'captcha'

The following table is required to make this package successful. Below you find the code for MySQL, but you can also implement your own requirement. All the database activity is done with callback functions, so you can have your own implementations work as well.

Sample callbacks with Eloquent ORM in Slim 3 as can be found in the settings file:

Settings

The settings for a Captcha object can be delivered from the object's default values, from the settings file or when creating the object.

Order of importance:

The default location of the settings.php file is <same-folder-as-app-is>/config/captcha/settings.php. In the root of this composer package you can find a sample settings.php file, which you can copy to your preferred location (rather the location just mentionend).

When creating the captcha you can add the alternative location at object creation time:

Creating a captcha

Creating a captcha could not be easier:

That's all. It will echo the captcha code in an html 'img' tag.

If you don't want to echo it directly on your client's display, you can also execute:

This will return an array with the following format:

When creating the image, it will save also a record in the 'captcha' table in your database.

Validating a captcha

This will check the validity with a valid record in the database table 'captcha'. It returns true or false.

Cleaning expired captcha's

Old records that have been expired are cleaned every time a captcha is validated. The validations are kept alive equal to the 'expiration' setting (in seconds).

Fonts

In the folder /assets/fonts of this package you will find a nice font for your captcha images. When you would like to use it, copy this to the assets folder in your public part of the site/application. Then adjust the following setting in the settings file:

Credits

Ellislab, for creating this functionality in CodeIgniter 3.

CodeIgniter, British Columbia Institute of Technology, CodeIgniter


All versions of slim-captcha with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5.9 || ^7.0
akrabat/rka-ip-address-middleware Version ^0.5
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 enovision/slim-captcha contains the following files

Loading the files please wait ....