An elegant code addition for JAWStats 0.7 which enables web site visitor city statistics. You will need to enable the GEOIP city plugin (from Maxmind) in your awstats web site config file - which is simple to do (there are serveral tutorials online on how to accomplish this).
If you find a bug in our code addition, please notify us here. Please note that we are not responsible for any exisiting bugs in the JAWStats 0.7 package. Also note that we have added an additional common fix to the code to prevent a refresh loop due to unexpected characters in query strings using preg_replace.
Download
MD5: 10a416bb593671f130a73c846655fa27 | SHA1: e6a087f3c9aa7f5b11f4cfb9a16c9be23b3c1cde
Installation
- Download the compressed package above, which contains all the modified files (./clsAWStats.php, ./xml_stats.php, ./js/jawstats.js).
- Unpack the package and merge the files into your desired JAWStats 0.7 installation.
- Open your JAWStats web site statitics as you normal would.
Screen Shot
AWStats Samples
awstats------.site_log_file.txt
# Plugin key - Pages - Hits - Bandwidth - Last access
BEGIN_PLUGIN_geoip_city_maxmind 435
ca_windsor_on 0 27009 0 0
...
...
END_PLUGIN_geoip_city_maxmind
awstats.site_configuration.conf
LoadPlugin="geoip_city_maxmind GEOIP_STANDARD /usr/local/share/GeoIP/GeoIPCity.dat"
Source Modifications
./clsAWStats.php
function CreateXMLString($sSection) {...}
function GetSection($sSection) {...}
function ValidateConfig() {...}
./xml_stats.php
Added line 70: case "PLUGIN_GEOIP_CITY_MAXMIND":
./js/jawstats.js
function DrawPage(sPage) {...}
function DrawPie_City() {...}
function DrawTable_City() {...}
function PopulateData_City(sPage) {...}
function PageLayout_City(sPage) {...}




Comments