hitcounter

Get the hit counter of the web page. Also the client ip address, Organization , Country etc..
9 followers

This extension is used to get the number of hits of a web page and the client details such as ( Ip address, Host name, Country, City, Region, Organization and so on...

How to use?

$this->widget('application.extensions.hitCounter.hitCounter');

How it works?

It takes the web service from the website of www.ipinfo.io

The array elements ?

$this->widget('application.extensions.hitCounter.hitCounter',
        array(
        'options' => array(
                        'ip'
                        'hits' => true,
                'country',    //Country of the client
                'org',        //Organization
                        'hostname',   //Host Name
                        'city',       //City
                        'region',     //Region
                        'loc'         //Location code of the client
            )
        ));

The version 0.2 includes the data storage of json format. So you can include at any view file where ever you want. Each page is identified using the controller ID and action ID.

The widget will not work at localhost in your local machine. It works only in live servers which is connected globally.

Note ! The details from the Ip address may not exactly match with the live data.

Total 4 comments

#18697 report it
Arockia Johnson at 2014/12/13 12:58pm
Check for <?php open tag

Hi,

Please check the storage.class.php <?php open tag

#18654 report it
Jordan Sipahutar at 2014/12/07 08:46pm
Object of class storage could not be converted to int

How can I solve Object of class storage could not be converted to int ,

Thank You..

#15376 report it
Arockia Johnson at 2013/11/03 02:48am
Thank you!

Storing in database is in progress. . Thank you so much skworden ...in version 0.2 I will include the same...

#15358 report it
skworden at 2013/10/31 02:47pm
Good Work

Is there any way to save the information to a database? Also, it's telling me to run it on a live server, however, it is on one.

EDIT: under /views/hitCounter.php

should line 3 be (notice the "!"):

if ($ip_details != '') {

instead of

if ($ip_details = '') {

Leave a comment

Please to leave your comment.

Create extension