Giter Site home page Giter Site logo

wafphp's Introduction

#WAFPHP# A php framework for Web Application Firewall.

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

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

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

起步:

// 为避免影响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#

###配置### #####配置文件路径:##### #your WAFPHP path#/Conf/config.default.php

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

github: here

进阶版教程: here

高阶版教程: here

wafphp's People

Contributors

zoachou avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.