cors / friendly-captcha-bundle
CORS - 友好验证码包
v1.0.3
2023-02-24 06:47 UTC
Requires
- php: >=7.3
- symfony/form: ^3.0 || ^4.0 || ^5.0 || ^6.0
- symfony/framework-bundle: ^3.0 || ^4.0 || ^5.0 || ^6.0
- symfony/http-client: ^3.0 || ^4.0 || ^5.0 || ^6.0
- symfony/validator: ^3.0 || ^4.0 || ^5.0 || ^6.0
- symfony/yaml: ^3.0 || ^4.0 || ^5.0 || ^6.0
- twig/twig: ^2.9 || ^3.0
Requires (Dev)
- phpunit/phpunit: ^7 || ^8 || ^9.5
README
此包为 Symfony 提供了简单的 friendlycaptcha.com 表单字段。
安装
步骤 1: 使用 composer 并启用 Bundle
要使用 Composer 安装 CORSFriendlyCaptchaBundle,只需在终端中输入
php composer.phar require cors/friendly-captcha-bundle
现在,Composer 将自动下载所有必要的文件,并为您安装它们。接下来,您需要更新您的 AppKernel.php
文件,并注册新的 Bundle
<?php // in AppKernel::registerBundles() $bundles = array( // ... new CORS\Bundle\FriendlyCaptchaBundle\CORSFriendlyCaptchaBundle(), // ... );
步骤 2: 配置 Bundle
cors_friendly_captcha: sitekey: here_is_your_sitekey secret: here_is_your_secret use_eu_endpoints: true|false
可选:更改端点
cors_friendly_captcha: puzzle: endpoint: https://api.friendlycaptcha.com/api/v1/puzzle eu_endpoint: https://eu-api.friendlycaptcha.eu/api/v1/puzzle validation: endpoint: https://api.friendlycaptcha.com/api/v1/siteverify eu_endpoint: https://eu-api.friendlycaptcha.eu/api/v1/siteverify