Can we access the log statistics information from web server and write these information to Mysql database automatically? How?
Thanks,
John
| SitePoint Sponsor |





Can we access the log statistics information from web server and write these information to Mysql database automatically? How?
Thanks,
John
Last edited by johnn; May 13, 2001 at 20:25.





I don't know about accessing the web server's log file (it should be possible, just open the file in PHP and parse each line - parsing log files isn't much fun though) but it's easy to grab details about each visitor to your site and save them in a database. Check out these PHP Builder articles:
http://www.phpbuilder.com/columns/se...n19990331.php3
http://www.phpbuilder.com/columns/mattias19990302.php3
http://www.phpbuilder.com/columns/tim19990130.php3
http://www.phpbuilder.com/columns/tim20001211.php3
A few other related tutorials :
http://zend.com/zend/tut/statistics.php
http://zend.com/zend/tut/gen-adv-web-stats.php
Although you may want to use one of these instead :
http://directory.google.com/Top/Comp.../Log_Analysis/

http://www.fractal.net/mod_mylog.tm
mod_mylog provides storing log entires into a MySQL database. mod_mylog is intelligent enough to cache logs to the drive when MySQL services are down. Other options include temporary caches for improved insert performance. Compatible with Apache 2.0a9.
Bookmarks