contributte/seznamcaptcha
最新稳定版本:0.5
Composer 安装命令:
composer require contributte/seznamcaptcha
包简介
SeznamCaptcha to Nette Framework
README 文档
README
Website ???? contributte.org | Contact ???????????? f3l1x.io | Twitter ???? @contributte
Disclaimer
| ⚠️ | This project is no longer being maintained. |
|---|
| Composer | contributte/seznamcaptcha |
|---|---|
| Version | |
| PHP | |
| License |
Usage
To install latest version of contributte/seznamcaptcha use Composer.
composer require contributte/seznamcaptcha
Configuration
Extension Registration
extensions: captcha: Contributte\SeznamCaptcha\DI\SeznamCaptchaExtension
Options
By default is auto: on and method: http, you can disable it and bind addCaptcha to your forms by yourself.
captcha: auto: off # on | off method: xmlrpc # http | xmlrpc
Form
Just register an extension and keep auto argument as it is.
use Nette\Application\UI\Form; protected function createComponentForm() { $form = new Form(); $form->addCaptcha('captcha') ->setRequired('Are you robot?'); $form->addSubmit('send'); $form->onSuccess[] = function (Form $form) { dump($form['captcha']); }; return $form; }
Rendering
Automatic
{control form}
Manual
It needs a CaptchaContainer consists of 2 inputs image and code.
<form n:name="form"> {input captcha-image} {input captcha-code} </form>
Advanced Example
use Minetro\SeznamCaptcha\Forms\CaptchaHash; use Minetro\SeznamCaptcha\Forms\CaptchaImage; use Minetro\SeznamCaptcha\Forms\CaptchaInput; use Minetro\SeznamCaptcha\Provider\CaptchaValidator; use Minetro\SeznamCaptcha\Provider\ProviderFactory; use Nette\Application\UI\Form; /** @var ProviderFactory @inject */ public $providerFactory; protected function createComponentForm() { $form = new Form(); $provider = $this->providerFactory->create(); $form['image'] = new CaptchaImage('Captcha', $provider); $form['hash'] = new CaptchaHash($provider); $form['code'] = new CaptchaInput('Code'); $form->addSubmit('send'); $form->onValidate[] = function (Form $form) use ($provider) { $validator = new CaptchaValidator($provider); $hash = $form['hash']->getHttpHash(); $code = $form['code']->getHttpCode(); if ($validator->validate($code, $hash) !== TRUE) { $form->addError('Are you robot?'); } }; $form->onSuccess[] = function (Form $form) { dump($form); }; return $form; }
For better usability add this functionality to your BaseForms, BaseFormFactory or
something like this. You can also create a trait for it.
Versions
| State | Version | Branch | Nette | PHP |
|---|---|---|---|---|
| dev | ^0.6 |
master |
3.0+ | >=7.2 |
| stable | ^0.5 |
master |
3.0+ | >=7.2 |
| stable | ^0.4 |
master |
2.4+ | >=5.6 |
Development
This package was maintained by these authors.
Consider to support contributte development team. Also thank you for using this package.
contributte/seznamcaptcha 适用场景与选型建议
contributte/seznamcaptcha 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 619.45k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2026 年 01 月 04 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「security」 「Forms」 「nette」 「captcha」 「seznam」 「contributte」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 contributte/seznamcaptcha 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 contributte/seznamcaptcha 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 contributte/seznamcaptcha 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
ConfirmationField is a form field for Atk14 applications. It's like the BooleanField (checkbox) but the ConfirmationField must be ticked.
Field for number with restricted count of digits and decimal places
Provide a way to secure accesses to all routes of an symfony application.
It's a barebone security class written on PHP
HTML and form generation
Nette Framework adapter for I18n package
统计信息
- 总下载量: 619.45k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 30
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-04