Download the PHP package dominiquevienne/honeypot without Composer

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

honeypot

This PHP library is used to manage honeypots in HTML forms. It will create the input form and do the necessary checks.

Installation

Recommended

Go to you project root directory and use composer using this command

Then create your application bootstrap using this kind of code

Manual installation

Laravel

Using honeypot in Laravel is as simple as a

and add the following lines in your class

Drupal 8

First of all, go to your root directory of your Drupal 8 project and type

In the Form controller (where you build your form), add

in order to gain access to Honeypot Form constructor.

Instantiate your form using the drupalForm config array key set to TRUE

Checks are done in the validate function using standard functions.

How it works

Once the package is installed the honeypot consists in enabling two steps

Form rendering

Where you will trigger Form::timeCheck() which will store date-time of the Form rendering and trigger Form::honeypotInput() used to return the honeypot form element.

Any of those two options are mandatory.

Be aware that you'll need to hide the honeypot field. To do that, you'll have three solutions

Available configuration

When you create the object, you have the ability to pass config values through an array.

Form

honeypotInputMask

This is the mask used to render the input field. You can use Form::getHoneypotInputMask() to get the current value.

honeypotInputClass

This is the CSS class used on the honeypot input field.

honeypotInputType

This is the HTML type of the input field

honeypotInputName

Way to force a specific name

honeypotInputNames

Array containing a list in which honeypot will take a random name followed by a hash.

formMethod

HTTP Method used to send the form

Honeypot

minFormCompletionTime

Time in seconds under which a form subscriber will be considered as a bot

maxFailureAttempts

Quantity of accepted failures per session before considered as a bot. When the number is reached and failureCheck is ON, every attempt will be considered as a failure during all the session lifetime.

maxAttempts

Quantity of accepted attempts per session before considered as a bot. When the number is reached and quantityCheck is ON, every attempt will be considered as a failure during all the session lifetime.

checks

Array of checks to be made when submitting form. By default, checks are

drupalForm

If set to TRUE, Form::inputs() will return a Drupal FAPI array instead of raw HTML


All versions of honeypot with dependencies

PHP Build Version
Package Version
Requires php Version ^5.3.3 || ^7.0
monolog/monolog Version >=1.23.0
phpunit/phpunit Version ^9.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 dominiquevienne/honeypot contains the following files

Loading the files please wait ....