devtoolboxuk/antiflood

AntiFlood Service

1.1.5 2019-04-26 13:13 UTC

This package is auto-updated.

Last update: 2024-03-26 23:49:07 UTC


README

AntiFlood Service

Build Status Coveralls CodeCov

Table of Contents

Background

Can be used to prevent multiple submissions of forms. But to be used along side CSRF protection

Usage

Usage of the hashing service

$ composer require devtoolboxuk/antiflood

Then include Composer's generated vendor/autoload.php to enable autoloading:

require 'vendor/autoload.php';
use devtoolboxuk/antiflood;

$this->antiFloodService = new AntiFloodService('_default',60);
Set AntiFlood Delay

By default, this is preset to 60 seconds.

$this->antiFloodService->setAntiFloodDelay('30');
Get AntiFlood Delay
$this->antiFloodService->getAntiFloodDelay();
Detect AntiFlood

Returns a boolean if the AntiFlood item is set

$this->antiFloodService->detectAntiFlood()

Maintainers

@DevToolboxUk.

License

MIT © DevToolboxUK