We are going to deploy the new yiiframework.com website on March 23, 2018 from 8:00 to 12:00 UTC.
Website and Yii documentation will not be available in this time frame. Check the news for more details.

Yii 1.1: yii-antispam

Yii antispam extension for user messages and registrations


Anti-spam by CleanTalk extension with protection against spam bots and manual spam.

No Captcha, no questions, no counting animals, no puzzles, no math.


Yii 1.1 or above


1) Get access key on Cleantalk.org

2) Extract content from archive under protected/extensions/yii-antispam

3) Open your application configuration in protected/config/main.php and modify components section:

// application components

4) Add validator in your model, for example ContactForm

class ContactForm extends CFormModel
    public $name;
    public $email;
    public $body;
    public function rules()
        return array(
                    'check'=>'message', /* Check type message or user */

5) In form view add special hidden element

<?php $form=$this->beginWidget('CActiveForm', array(
    <?php echo Yii::app()->cleanTalk->checkJsHiddenField()?>
    <?php echo CHtml::submitButton('Submit'); ?>
<?php $this->endWidget(); ?>


GNU General Public License


Total 5 comments

#20049 report it
ToolMayNARD at 2017/03/17 05:21am
Really great

I'm using this module in my website based on Yii 1.x. Really happy about performance, no more spam problems!

#19421 report it
rustik at 2015/06/30 02:16pm

Released version for Yii2


#19254 report it
rustik at 2015/04/29 01:17am
Yii 2

In the near future we implement extension for Yii2.

#19247 report it
mem at 2015/04/27 09:15am
Yii 2

Any plans for upgrading this for Yii 2?

#17458 report it
Petr.Grishin at 2014/06/16 03:53pm


Leave a comment

Please to leave your comment.

Create extension