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.
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 = '') {
Thank you!
Storing in database is in progress. . Thank you so much skworden ...in version 0.2 I will include the same...
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..
Check for <?php open tag
Hi,
Please check the storage.class.php <?php open tag
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.