PHPackages                             softark/yii2-mb-captcha - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. softark/yii2-mb-captcha

ActiveYii2-extension[Validation &amp; Sanitization](/categories/validation)

softark/yii2-mb-captcha
=======================

Yii2 Multibyte CAPTCHA

1.1.0(11y ago)38572BSD-3-ClausePHPCI failing

Since Nov 15Pushed 3y ago2 watchersCompare

[ Source](https://github.com/softark/yii2-mb-captcha)[ Packagist](https://packagist.org/packages/softark/yii2-mb-captcha)[ RSS](/packages/softark-yii2-mb-captcha/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

yii2-mb-captcha
===============

[](#yii2-mb-captcha)

Multibyte captcha widget for Yii framework 2.0.

[![Multibyte Captcha in Action](images/mb-captcha.png "Multibyte Captcha in Action")](images/mb-captcha.png)

[![Multibyte Captcha using Chinese characters](images/mb-captcha-c.png "Multibyte Captcha using Chinese characters")](images/mb-captcha-c.png)

[日本語の README](README_ja.md)

Description
-----------

[](#description)

**softark\\mbcaptcha\\Captcha** is an extension to **yii\\captcha\\Captcha**.

While **yii\\captcha\\Captcha** renders a CAPTCHA image only with **English alphabets**, **softark\\mbcaptcha\\Captcha** can render it with **multibyte characters** ... Japanese Hirakana by default, but you may use any multibyte characters by providing the appropriate font.

Optionally softark\\mbcaptcha\\Captcha may render a link next to the CAPTCHA image which will enable you to toggle the CAPTCHA type from the multibyte character to English alphabet, and vice versa.

**softark\\mbcaptcha\\Captcha** must be used together with **softark\\mbcaptcha\\CaptchaAction** to provide its feature.

Requirements
------------

[](#requirements)

- Yii Version 2.0.44 or later
- PHP GD + FreeType extension or ImageMagick extension

Usage
-----

[](#usage)

1. Add `softark/yii2-mb-captcha` in your project's `composer.json`, and let Composer configure your project.

    ```
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": "~2.0.44",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-swiftmailer": "*",
        "softark/yii2-mb-captcha": "dev-master"
    },
    ```
2. Use `softark\mbcaptcha\Captcha` in place of `yii\captcha\Captcha` in your view.

    ```
    /* use yii\captcha\Captcha; */
    use softark\mbcaptcha\Captcha;
    ...
