PHPackages                             ethercreative/yii2-ip-ratelimiter - 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. ethercreative/yii2-ip-ratelimiter

ActiveYii2-module

ethercreative/yii2-ip-ratelimiter
=================================

Allow guest clients to be rate limited, using their IP as the identifier.

1.0(10y ago)36138.8k↓22.5%9[1 PRs](https://github.com/ethercreative/yii2-ip-ratelimiter/pulls)1MITPHP

Since Apr 29Pushed 3y ago3 watchersCompare

[ Source](https://github.com/ethercreative/yii2-ip-ratelimiter)[ Packagist](https://packagist.org/packages/ethercreative/yii2-ip-ratelimiter)[ RSS](/packages/ethercreative-yii2-ip-ratelimiter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (1)

[![Yii2 IP Rate Limiter](resources/banner.jpg)](resources/banner.jpg)

yii2-ip-ratelimiter
===================

[](#yii2-ip-ratelimiter)

Allow guest clients to be rate limited, using their IP as the identifier.

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require ethercreative/yii2-ip-ratelimiter "1.*"

```

or add

```
"ethercreative/yii2-ip-ratelimiter": "1.*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Modify the bahavior method of the controller you want to rate limit

```
public function behaviors()
{
	$behaviors = parent::behaviors();
	$behaviors['rateLimiter'] = [
		// Use class
		'class' => \ethercreative\ratelimiter\RateLimiter::className(),

		// The maximum number of allowed requests
		'rateLimit' => 100,

		// The time period for the rates to apply to
		'timePeriod' => 600,

		// Separate rate limiting for guests and authenticated users
		// Defaults to true
		// - false: use one set of rates, whether you are authenticated or not
		// - true: use separate ratesfor guests and authenticated users
		'separateRates' => false,

		// Whether to return HTTP headers containing the current rate limiting information
		'enableRateLimitHeaders' => false,
	];
	return $behaviors;
}

```

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 57.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3671d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/807df0a17d1291238650a6652a05231e0eecc1e7236480762cbb674a6fe61198?d=identicon)[mattether](/maintainers/mattether)

---

Top Contributors

[![CSharpRU](https://avatars.githubusercontent.com/u/640600?v=4)](https://github.com/CSharpRU "CSharpRU (4 commits)")[![alexjcollins](https://avatars.githubusercontent.com/u/12031196?v=4)](https://github.com/alexjcollins "alexjcollins (2 commits)")[![Xrymz](https://avatars.githubusercontent.com/u/309405?v=4)](https://github.com/Xrymz "Xrymz (1 commits)")

---

Tags

yii2ratelimiter

### Embed Badge

![Health badge](/badges/ethercreative-yii2-ip-ratelimiter/health.svg)

```
[![Health](https://phpackages.com/badges/ethercreative-yii2-ip-ratelimiter/health.svg)](https://phpackages.com/packages/ethercreative-yii2-ip-ratelimiter)
```

###  Alternatives

[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
