frdl/php-floodprotection

Simple IP Flood Protection

Maintainers

👁 webfan

Package info

github.com/frdl/php-floodprotection

pkg:composer/frdl/php-floodprotection

Statistics

Installs: 333

Dependents: 3

Suggesters: 0

Stars: 5

Open Issues: 1

v0.0.3 2020-07-26 19:14 UTC

Requires

  • php: >=7.2

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 2bdc35d3d0ab712271c87a07dd77704596d5eb76

This package is auto-updated.

Last update: 2026-06-25 16:38:59 UTC


README

Simple IP Flood Protection

Code from https://stackoverflow.com/questions/3026640/quick-and-easy-flood-protection as Class.

use frdl\security\floodprotection\FloodProtection;

 $FloodProtection = new FloodProtection('login', 10, 30);	
 if($FloodProtection->check($_SERVER['REMOTE_ADDR'])){
 header("HTTP/1.1 429 Too Many Requests");
 exit("Hit some *");
 }

Bug notice:

Please note this bug!