承接 freinir/zakarum 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

freinir/zakarum

最新稳定版本:1.1.3

Composer 安装命令:

composer require freinir/zakarum

包简介

The package is designed to block unwanted traffic

README 文档

README

About

Zakarum is a protection layer that helps prevent unwanted access to your website from bots and automated traffic.

The protection is based on a set of rules that analyze incoming requests.
You can configure the built-in rules or add your own custom rules to extend the behavior.

The system is modular and rule-based, which allows flexible protection strategies depending on your project needs.

Installation

Install the package via Composer

`composer require freinir/ad-wizard`

Basic usage

Call the main class at any convenient place during your application initialization.

The protection system has a modular structure based on rules that must implement the RuleInterface.
If a request violates at least one rule, the user will be presented with a CAPTCHA challenge (ReCaptcha by default).

After successfully passing the CAPTCHA, a secret hash is stored in the client's cookies for 1 hour (the cookie lifetime is configurable).

$captcha = new Recaptcha('secretKey', 'publicKey');

$cookie = new CookieService('cookie_secret_salt', 3600, 'cookie_name');

$context = RequestContext::fromGlobals();
$guard = new Guard($context, $captcha, $cookie);

$ipList = (new IpCollectorDataProvider([
    ['127.0.0.1'],
    (new GoogleIpDataProvider()) // optional
]))->getIpList();

$guard->inWhiteList($ipList);

$guard->checkRule((new RefererRule()), $context);
$guard->checkRule((new LanguageRule()), $context);

$badUserAgentRule = new UserAgentRule(['dotbot', '', '']);
$guard->checkRule($badUserAgentRule, $context);

$allowCountriesRule = new GeoIpRule(
    ["AU", "BY"],
    __DIR__ . '/geoData/SxGeo.dat'
);

$guard->checkRule($allowCountriesRule, $context);

统计信息

  • 总下载量: 108
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-03-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固