panlatent / craft-geetest
Geetest plugin for Craft 3
Installs: 46
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0
- guzzlehttp/guzzle: ^6.3
This package is auto-updated.
Last update: 2024-10-23 06:02:14 UTC
README
Geetest plugin for Craft 3. Geetest 极验 provides a robust human-machine verification solution. This plugin provides these features for Craft.
Features
- Captcha
Requirements
This plugin requires Craft CMS 3.0 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require panlatent/craft-geetest
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for Geetest.
Usage
-
Set Plugin Setting: Access ID and Access Key
-
Add to a template:
{{ geetestInput() }}
Notice: Don't forget CSRF verification {{ csrfInput() }}
.
- Validate in a controller:
public function actionRegister() { \panlatent\craft\geetest\helpers\Getest::requireValidated(); // or $isValid = \panlatent\craft\geetest\helpers\Getest::isValidated(); }