Download the PHP package inimist/cakephp-captcha without Composer

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

CakePHP Captcha Plugin

Bot Detect using Image captcha, Math captcha and Google-recaptcha for CakePHP 3

Why to use this plugin?

This CakePHP Captcha plugin requires CakePHP 3.6+.

Quick Features

Installation

and

Implementation

  1. Load Captcha plugin.

    If you ran above skip this step.

    Place in your application's Application.php or bootstrap.php file.

  2. Load Capthca component

    Place in your controllerr's initialize function

    OR

    Load Captcha component on the fly, in the particular controller action function. For example in the signup() action:

    $

  3. Add Behavior to your Model/Table

    Place in your Model (Table class) Note: If you use Google Recaptcha add "secret" option with its value which you get from Google. Also, add Google site key in the view file.

  4. Create an input field in your view's form as:

  5. In your controller in which your form data is processed, place (required with image and math catpcha):

    just before patching entity. For example:

A fully working demo can be found here. You can install a fully working demo as a plugin from here.

Settings

The best place for settings is your_apps/config/app.php file. Create a new key named "Captcha" and specify settings there.

'Captcha' => [
    'type' => 'recaptcha',
    'sitekey' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
    //'clabel' => 'Enter code',
    //'reload_txt' => 'Reload??'
]

More examples

Options:

$options['width']=150;
$options['height']=50;
$options['theme']='default';
echo $this->Captcha->create('captcha_input_field_name', $options);

Multiple Captchas on same page:

//form 1
$options1['width']=150;
$options1['height']=50;
echo $this->Captcha->create('captcha_input_field_name1', $options1);

//form 2, A math captcha, anywhere on the page
$options2['type']='math';
echo $this->Captcha->create('captcha_input_field_name2', $custom2);

Options for view template. Ex: $this->Captcha->create('field_name', $options):

(All above options can also be set from controller. Ex: $this->loadComponent('Captcha.Captcha', $options))

**Options for model. Ex: $this->addBehavior('Captcha.Captcha', $options);

Known Issues:

  1. Headers already sent issue. The component uses php's header() function to send or generate captcha image as raw HTML output. Make sure there is no output generated before the create() function in your component. It is common error to have spaces, tags or empty space in your files which would cause rending no image in the captcha.

  2. GD library and True Type Font (TTF) support extensions are enabled in PHP.

  3. This captcha script uses three random font faces, anonymous, droidsans and ubuntu to generate fonts in the captcha images. These font faces are placed in the captcha/src/Lib/Fonts of this download. I have seen that, sometimes, these font files get corrupted during downloads. If you see font not found error in your error logs and captcha are failed to generate, try downloading these font faces from their respective sources and replace them in the mentioned folder. You can also use different font families by placing them Fonts folder and referencing them in the CaptchaComponent.php component file.

All versions of cakephp-captcha with dependencies

PHP Build Version
Package Version
No informations.
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 inimist/cakephp-captcha contains the following files

Loading the files please wait ....