PHPackages                             tangzhixing1218/listen - 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. tangzhixing1218/listen

ActiveLibrary

tangzhixing1218/listen
======================

Package description here.

05PHP

Since May 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/TangZhiXing18/IPListen)[ Packagist](https://packagist.org/packages/tangzhixing1218/listen)[ RSS](/packages/tangzhixing1218-listen/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

 listen
========

[](#-listen-)

 .

Installing
----------

[](#installing)

```
$ composer require tangzhixing1218/listen -vvv
```

Usage
-----

[](#usage)

TODO

配置
--

[](#配置)

在laravel config/service.php下配置

```
'listen'=>[
    'max_num'=>10,限流次数
    'ip_expire'=>30,限流分钟数

    //这个是监听ip，一般配置成会被人恶意攻击能达到
    的次数，除了静止访问，还会记录进危险名单

    'request_total_num'=>30,请求最大总次数
    'request_one_num'=>20,单个接口请求次数
    'black_expire'=>60*5,//超过次数静止访问的时间
],

//静止访问的IP
'black_array'=>[
    '127.0.0.1','未知IP'
]

```

使用说明
----

[](#使用说明)

```
方法一般使用在中间件里面

ListenFacade::start();//限流 成功返回true 否则抛出异常
BlackFacade::start();//ip监听 成功返回true 否则抛出异常
BlackFacade::risk_ip;//返回危险IP的数组
ForbidenFacade::start();//按black_array配置，禁止配置的ip访问，
成功返回true,否则抛出异常

```

MIT

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16383600?v=4)[saber123456](/maintainers/saber123456)[@Saber123456](https://github.com/Saber123456)

---

Top Contributors

[![TangZhiXing18](https://avatars.githubusercontent.com/u/45386548?v=4)](https://github.com/TangZhiXing18 "TangZhiXing18 (2 commits)")

### Embed Badge

![Health badge](/badges/tangzhixing1218-listen/health.svg)

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

PHPackages © 2026

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