devhamidreza / ratelimitredis
simple rate limit use Redis
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/devhamidreza/ratelimitredis
Requires
- predis/predis: ^2.2
This package is auto-updated.
Last update: 2025-10-06 16:10:06 UTC
README
simple RateLimit Class use Redis
<?php use RateLimit\RateLimit; use RateLimit\SpamDetector; require_once 'vendor/autoload.php'; $rateLimit = new RateLimit(); $spamDetector = new SpamDetector(); $isLimited = $rateLimit->isLimited('index'); if($isLimited){ die('You are blocked'); } $id = '12'; $isSpam = $spamDetector->isSpam($id); if ($isSpam) { die('Please do not spam' ); } echo "welcome";