Daniel Schierbeck wrote:
I'm trying to develop a set of functions that can handle the statistics of a website. I want them to be as flexible as possible, and i want to be able to have several different "views" (day, week, month, year). For example if i wanted to know how many visitors, visits and page hits there was each month last year, i could call the function like this:
Is there a simpler way of approaching this?
You can save yourself a lot of time and effort by installing something like analog or webalizer (both free), unless ofcourse your hosting company is ripping you off by not giving access to the raw log files.
The other factor you would want to consider is that inserting into a mysql database is much slower than retrieving from it particularly when you have lots of indices - you will need plenty of them if you are going to build any kind of report.
-- Raditha Dissanayake. ------------------------------------------------------------------------ http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader Graphical User Inteface. Just 128 KB | with progress bar.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php