Do I need to ceate a database so that it works?
if yes, is it pcounter_save ( user_ip, save_name, save_value, day_time)?
I followed the instructions but allways getting -1 as online users
Quote
Documentation
Requirements
Yii 1.0 or above
Installation
Extract the release file under protected/extensions
Insert this code in the config/main.php:
// application components
'components'=>array(
// ...
// UserCounter
'counter' => array(
'class' => 'UserCounter',
),
),
Initialization
// Execute the counter before you use the getter-funtions!
Yii::app()->counter->refresh();
Usage
See the following code example:
online: <?php echo Yii::app()->counter->getOnline(); ?><br />
today: <?php echo Yii::app()->counter->getToday(); ?><br />
yesterday: <?php echo Yii::app()->counter->getYesterday(); ?><br />
total: <?php echo Yii::app()->counter->getTotal(); ?><br />
maximum: <?php echo Yii::app()->counter->getMaximal(); ?><br />
date for maximum: <?php echo date('d.m.Y', Yii::app()->counter->getMaximalTime()); ?>
Requirements
Yii 1.0 or above
Installation
Extract the release file under protected/extensions
Insert this code in the config/main.php:
// application components
'components'=>array(
// ...
// UserCounter
'counter' => array(
'class' => 'UserCounter',
),
),
Initialization
// Execute the counter before you use the getter-funtions!
Yii::app()->counter->refresh();
Usage
See the following code example:
online: <?php echo Yii::app()->counter->getOnline(); ?><br />
today: <?php echo Yii::app()->counter->getToday(); ?><br />
yesterday: <?php echo Yii::app()->counter->getYesterday(); ?><br />
total: <?php echo Yii::app()->counter->getTotal(); ?><br />
maximum: <?php echo Yii::app()->counter->getMaximal(); ?><br />
date for maximum: <?php echo date('d.m.Y', Yii::app()->counter->getMaximalTime()); ?>

Help













