PHPackages                             mitirrli/limit - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. mitirrli/limit

ActiveLibrary[HTTP &amp; Networking](/categories/http)

mitirrli/limit
==============

限制接口请求次数

1.0.7(6y ago)1125MITPHPPHP &gt;=5.6

Since Sep 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Mitirrli/limit)[ Packagist](https://packagist.org/packages/mitirrli/limit)[ RSS](/packages/mitirrli-limit/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (6)Dependencies (1)Versions (9)Used By (0)

 Limit
=======

[](#-limit-)

🌈 基于redis的接口限制组件

[![Build Status](https://camo.githubusercontent.com/ff7213544dbb929a72f0cc533c00803cc5665f5b01d546afeb66a81d7c5fec11/68747470733a2f2f7472617669732d63692e6f72672f6f766572747275652f776561746865722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mitirrli/yunpian)[![StyleCI build status](https://camo.githubusercontent.com/c895fd1b0f7dd915d6aa8a717b3abbe9afbeb914e8e16cb20b7ff9e486c2cbb9/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3230353936393535342f736869656c64)](https://camo.githubusercontent.com/c895fd1b0f7dd915d6aa8a717b3abbe9afbeb914e8e16cb20b7ff9e486c2cbb9/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3230353936393535342f736869656c64)[![Total Downloads](https://camo.githubusercontent.com/104b6c2f31b7fa79397d110b0cb8a05c934cc4e457b4440737e4b4b8cdf19ca1/68747470733a2f2f706f7365722e707567782e6f72672f6d69746972726c692f6c696d69742f646f776e6c6f616473)](https://packagist.org/packages/mitirrli/yunpian)[![Latest Stable Version](https://camo.githubusercontent.com/2da3f022386eaa2088bf7fc88a6167484f8f595e51fc862a53bd32d8effeaa6f/68747470733a2f2f706f7365722e707567782e6f72672f6d69746972726c692f6c696d69742f762f737461626c65)](https://packagist.org/packages/mitirrli/yunpian)[![Latest Unstable Version](https://camo.githubusercontent.com/d16d6629ac90606b0c50a9abd257d24179a15c3795149653fb23036b6a004a2f/68747470733a2f2f706f7365722e707567782e6f72672f6d69746972726c692f6c696d69742f762f756e737461626c65)](https://packagist.org/packages/mitirrli/yunpian)[![License](https://camo.githubusercontent.com/3a14dd4d105a83edfa0ad4fa408d62e83f72ae2ee67bfadc1d69e545591bc4df/68747470733a2f2f706f7365722e707567782e6f72672f6d69746972726c692f6c696d69742f6c6963656e7365)](https://packagist.org/packages/mitirrli/limit)

环境需求
----

[](#环境需求)

- PHP &gt;= 5.6

安装
--

[](#安装)

```
$ composer require "mitirrli/limit"
```

使用
--

[](#使用)

```
$config = [
    'second' => 60,//多少秒
    'num' => 50,//接口请求次数
    'redis' => [//redis配置

    ],
];

$limit = new Limit($config);//限制接口请求次数
if (!$limit->run()) return['1005', '当前接口请求次数已达上限，请稍后重试'];

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Every ~0 days

Total

8

Last Release

2445d ago

Major Versions

v0.01 → 1.0.12019-09-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae6fcc430a0d8c57a965a23d47096d0fb28660a2e958c3f9f45f27e7f444a535?d=identicon)[Mitirrli](/maintainers/Mitirrli)

---

Top Contributors

[![Mitirrli](https://avatars.githubusercontent.com/u/50682346?v=4)](https://github.com/Mitirrli "Mitirrli (31 commits)")

### Embed Badge

![Health badge](/badges/mitirrli-limit/health.svg)

```
[![Health](https://phpackages.com/badges/mitirrli-limit/health.svg)](https://phpackages.com/packages/mitirrli-limit)
```

###  Alternatives

[yiicod/yii2-socketio

The simple and powerful socketio for the Yii2 framework

4619.7k](/packages/yiicod-yii2-socketio)[gointegro/hateoas

GOintegro HATEOAS Lib

408.0k1](/packages/gointegro-hateoas)[sfcod/socketio

SocketIo adapter for Symfony

252.7k](/packages/sfcod-socketio)

PHPackages © 2026

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