PHPackages                             aayushgauba/aiwaf - 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. [Security](/categories/security)
4. /
5. aayushgauba/aiwaf

ActiveLibrary[Security](/categories/security)

aayushgauba/aiwaf
=================

Adaptive Intelligent Web Application Firewall for PHP

02PHP

Since Apr 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/aayushgauba/aiwaf-php)[ Packagist](https://packagist.org/packages/aayushgauba/aiwaf)[ RSS](/packages/aayushgauba-aiwaf/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

AIWAF Integration Guide
=======================

[](#aiwaf-integration-guide)

This README shows you exactly **how to plug AIWAF** into your existing PHP application, whether you installed via Composer or manually, and how to configure rate limiting, logging, and model loading.

---

1. Prerequisites
----------------

[](#1-prerequisites)

- PHP 7.4 or higher
- (Optional) Composer for autoloading and dependency management
- Web-accessible `resources/` folder for logs and model files

---

2. Installation
---------------

[](#2-installation)

### Composer (recommended)

[](#composer-recommended)

```
composer require aayushgauba/aiwaf
```

This installs AIWAF under `vendor/aayushgauba/aiwaf` and sets up PSR-4 autoloading.

### Manual

[](#manual)

Clone or download this repository alongside your code:

```
git clone https://github.com/aayushgauba/aiwaf-php.git aiwaf
```

Ensure your app can `require` the `src/` folder.

---

3. Setup
--------

[](#3-setup)

1. **Create** the `resources/` directory if it doesn’t exist: ```
    mkdir resources
    touch resources/blocked_ips.json
    ```
2. **(Optional)** Create an empty feature‐log CSV: ```
    touch resources/request_features.csv
    ```
3. **(Optional)** Copy and edit `src/Config.php` to adjust thresholds: ```
