AntiFlood Service
Can be used to prevent multiple submissions of forms. But to be used along side CSRF protection
Usage of the hashing service
$ composer require devtoolboxuk/styx
Then include Composer's generated vendor/autoload.php to enable autoloading:
require 'vendor/autoload.php';
use devtoolboxuk/styx;
$this->antiFloodService = new Styx('_default',60);
By default, this is preset to 60 seconds.
$this->antiFloodService->setAntiFloodDelay('30');
$this->antiFloodService->getAntiFloodDelay();
Returns a boolean if the AntiFlood item is set
$this->antiFloodService->detectAntiFlood();
MIT © DevToolboxUK