PHPackages                             doylee/wafphp - 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. doylee/wafphp

ActiveLibrary

doylee/wafphp
=============

1.0.x-dev(7y ago)0312GPL-2.0PHP

Since May 29Pushed 7y agoCompare

[ Source](https://github.com/DongyunLee/WAFPHP)[ Packagist](https://packagist.org/packages/doylee/wafphp)[ RSS](/packages/doylee-wafphp/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (2)Used By (2)

WAFPHP
======

[](#wafphp)

##### A php framework for Web Application Firewall.

[](#a-php-framework-for-web-application-firewall)

一个PHP级Web应用防护框架。

旨在提供一个与现有代码互不冲突干扰的PHP级Web应用防护框架，可基于此框架之上开发各种诸如防机器人恶意采集等Web应用防护插件，即插即用，乃居家旅行必备良药。

PS:当然，这只是一种思路，适用于某些特殊场景，它并不能完全替代你的专业防火墙 :)

### Install

[](#install)

> #### ***`composer require doylee/wafphp`***
>
> [](#composer-require-doyleewafphp)

### Usage

[](#usage)

```
	// 为避免影响WAFPHP的输出，在加载WAFPHP之前请勿有任何html输出
	require_once '#your WAFPHP path#/WAFPHP.php';
	// 单例模式启动WAFPHP
	$wafPHP = WAFPHP\WAFPHP::getInstance();
	// 执行脚本检测
	$wafPHP->runCheck();
	#Your code#

```

或者

```
	// 为避免影响WAFPHP的输出，在加载WAFPHP之前请勿有任何html输出
	require_once '#your WAFPHP path#/WAFPHP.php';
	// 可根据需求在调用时使用独立配置，默认使用配置文件中的配置
	$config = WAFPHP\WAFPHP::getCurrentConfig();
	// 修改特定配置参数
	$config['SOME_CONFIG'] = 'Your value';
	// 以自定义配置启动WAFPHP
	$wafPHP = WAFPHP\WAFPHP::getInstance($config);
	// 执行脚本检测
	$wafPHP->runCheck();
	#Your code#

```

### Config

[](#config)

##### 配置文件路径：

[](#配置文件路径)

> `your_WAFPHP_path/Conf/config.default.php`

详细配置请参考配置文件中的备注

github： [here](https://github.com/ZoaChou/WAFPHP)

进阶版教程： [here](https://www.mudoom.com/Article/show/id/35.html)

高阶版教程： [here](https://www.mudoom.com/Article/show/id/36.html)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

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

2908d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2192a72ed455b8c5fa42a1127346fa893a865a3842c98e70e8a9e76a4f729eaf?d=identicon)[ch4o5](/maintainers/ch4o5)

---

Top Contributors

[![ZoaChou](https://avatars.githubusercontent.com/u/6914679?v=4)](https://github.com/ZoaChou "ZoaChou (2 commits)")[![DongyunLee](https://avatars.githubusercontent.com/u/22876282?v=4)](https://github.com/DongyunLee "DongyunLee (1 commits)")

### Embed Badge

![Health badge](/badges/doylee-wafphp/health.svg)

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

PHPackages © 2026

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