This extension can set a limiter to user action. 为用户的某种操作设一个一个时间限制。
protected/componentssi_limit (
id int(11) unsigned NOT NULL AUTO_INCREMENT,
action varchar(200) NOT NULL,
hash varchar(32) NOT NULL,
create_time int(10) unsigned NOT NULL,
period int(10) unsigned NOT NULL,
total_times smallint(5) unsigned NOT NULL,
remain_times smallint(5) unsigned NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY hash (hash)
) ;
[/code]See the following code example: ~~~ [code] Yii::app()->Limiter->check(actionName, $params, $period, $total_times); [/code]
[php] Yii::app()->Limiter->spend('actionName', $params); [/php]
Be the first person to leave a comment
Please login to leave your comment.