I am pleased to announce you the release of MasinoVisitorStatistics10 extension for PHPMaker 10. This extension will add the ability to log visitor statistics in your web applications that generated by PHPMaker 10. You can now log all the related visitor statistics, such as: browser, operating system, visitor statistic per hour, day, month, and year easily by simply using this extension in your PHPMaker 10 project.
You can adjust the related settings either from the extension side or from the generated configuration (ewcfg10.php) file later. By default, this feature is disabled. Make sure you have enabled EnableVisitorStats item from Tools -> Extensions -> MasinoVisitorStatistics10 -> Advanced -> Project in order to make this feature is working properly.
There are six new additional tables were added into your database as follows:
- stats_counter
- stats_counterlog
- stats_hour
- stats_date
- stats_month
- stats_year
Unlike the similar extension that I created for PHPMaker 9 which needed additional code that must be added from outside of the extension, then this extension will automatically add that code into the generated header.php file. In addition, this extension will handle the field name if you are using Oracle database. Not only that, this extension also will check the PHP version in your web server so that the Host Name of your web application users will be get and saved properly into stats_counterlog table above.
Last but not least, this extension also will fix the difference number of hits between stats_counterlog table and the other 5 statistics tables. In version 9, this extension will result the different number of hits among the stats_ tables. In order to achieve this result properly, then make sure you have to reset all the related tables by simply running the following SQL script:
DROP TABLE IF EXISTS `stats_counter`; CREATE TABLE `stats_counter` ( `Type` varchar(50) NOT NULL DEFAULT '', `Variable` varchar(50) NOT NULL DEFAULT '', `Counter` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`Type`,`Variable`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of stats_counter -- ---------------------------- INSERT INTO `stats_counter` VALUES ('total', 'hits', '0'); INSERT INTO `stats_counter` VALUES ('browser', 'WebTV', '0'); INSERT INTO `stats_counter` VALUES ('browser', 'Lynx', '0'); INSERT INTO `stats_counter` VALUES ('browser', 'MSIE', '0'); INSERT INTO `stats_counter` VALUES ('browser', 'Opera', '0'); INSERT INTO `stats_counter` VALUES ('browser', 'Konqueror', '0'); INSERT INTO `stats_counter` VALUES ('browser', 'Netscape', '0'); INSERT INTO `stats_counter` VALUES ('browser', 'FireFox', '0'); INSERT INTO `stats_counter` VALUES ('browser', 'Bot', '0'); INSERT INTO `stats_counter` VALUES ('browser', 'Other', '0'); INSERT INTO `stats_counter` VALUES ('os', 'Windows', '0'); INSERT INTO `stats_counter` VALUES ('os', 'Linux', '0'); INSERT INTO `stats_counter` VALUES ('os', 'Mac', '0'); INSERT INTO `stats_counter` VALUES ('os', 'FreeBSD', '0'); INSERT INTO `stats_counter` VALUES ('os', 'SunOS', '0'); INSERT INTO `stats_counter` VALUES ('os', 'IRIX', '0'); INSERT INTO `stats_counter` VALUES ('os', 'BeOS', '0'); INSERT INTO `stats_counter` VALUES ('os', 'OS/2', '0'); INSERT INTO `stats_counter` VALUES ('os', 'AIX', '0'); INSERT INTO `stats_counter` VALUES ('os', 'Other', '0'); -- ---------------------------- -- Table structure for `stats_counterlog` -- ---------------------------- DROP TABLE IF EXISTS `stats_counterlog`; CREATE TABLE `stats_counterlog` ( `IP_Address` varchar(50) NOT NULL DEFAULT '', `Hostname` varchar(50) DEFAULT NULL, `First_Visit` datetime NOT NULL, `Last_Visit` datetime NOT NULL, `Counter` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`IP_Address`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of stats_counterlog -- ---------------------------- -- ---------------------------- -- Table structure for `stats_date` -- ---------------------------- DROP TABLE IF EXISTS `stats_date`; CREATE TABLE `stats_date` ( `Year` smallint(6) NOT NULL DEFAULT '0', `Month` tinyint(4) NOT NULL DEFAULT '0', `Date` tinyint(4) NOT NULL DEFAULT '0', `Hits` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`Date`,`Month`,`Year`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of stats_date -- ---------------------------- -- ---------------------------- -- Table structure for `stats_hour` -- ---------------------------- DROP TABLE IF EXISTS `stats_hour`; CREATE TABLE `stats_hour` ( `Year` smallint(6) NOT NULL DEFAULT '0', `Month` tinyint(4) NOT NULL DEFAULT '0', `Date` tinyint(4) NOT NULL DEFAULT '0', `Hour` tinyint(4) NOT NULL DEFAULT '0', `Hits` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`Date`,`Hour`,`Month`,`Year`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of stats_hour -- ---------------------------- -- ---------------------------- -- Table structure for `stats_month` -- ---------------------------- DROP TABLE IF EXISTS `stats_month`; CREATE TABLE `stats_month` ( `Year` smallint(6) NOT NULL DEFAULT '0', `Month` tinyint(4) NOT NULL DEFAULT '0', `Hits` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`Year`,`Month`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of stats_month -- ---------------------------- -- ---------------------------- -- Table structure for `stats_year` -- ---------------------------- DROP TABLE IF EXISTS `stats_year`; CREATE TABLE `stats_year` ( `Year` smallint(6) NOT NULL DEFAULT '0', `Hits` bigint(20) NOT NULL DEFAULT '0', PRIMARY KEY (`Year`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; -- ---------------------------- -- Records of stats_year -- ----------------------------
Please note that this table name is the same name with the table name in the extension setting. So, if you want to change the table name with yours, then make sure you have change both from extension setting and from SQL script above.
Download Link:
Please re-download another extensions for PHPMaker 10 that I also updated with the release of this extension in order to get this extension will work properly in your generated web applications. Read Intersection on overriding the same template file section from this post for the reason.
Leave a Reply
You must be logged in to post a comment.