PHPackages                             dominiquevienne/honeypot - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. dominiquevienne/honeypot

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

dominiquevienne/honeypot
========================

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

v3.3-stable(4y ago)102295[1 issues](https://github.com/dominiquevienne/honeypot/issues)Apache-2.0PHPPHP ^5.3.3 || ^7.0

Since Jun 26Pushed 4y ago2 watchersCompare

[ Source](https://github.com/dominiquevienne/honeypot)[ Packagist](https://packagist.org/packages/dominiquevienne/honeypot)[ RSS](/packages/dominiquevienne-honeypot/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (2)Versions (18)Used By (0)

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
------------

[](#installation)

### Recommended

[](#recommended)

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

```
composer require dominiquevienne/honeypot

```

Then create your application bootstrap using this kind of code

```

```

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

- use CSS (default class is hide)
- remove the element from the DOM using JS (Pure Javascript, jQuery or other). This is already done by using default function `$oForm->inputs()` or by using `$oForm->getHoneypotScript()` which would return a script in pure javascript that would remove the honeypot field from the DOM.

### Form action page

[](#form-action-page)

Before you do the real job in your script of the landing page of your form (`action` attribute of Form element), you will have to use this code

```
