...

View Full Version : High traffic website: Log & Hitcounter



calstap
02-23-2012, 02:40 PM
Hey.

I have a quite high traffic website, around 200 users constantly browsing the site and up to 200k pageviews per day.

I'd like make full log of the page visists and have a hitcounter for some pages.

I made a simple php script that reads/writes hit values from/to files. The file got constantly corrupted or something similar and the counter started from 0 again.

I'm still quite beginner with php.
What is the best way to make a hit counter for such a high traffic page?
And how about the logs?

Dan13071992
02-23-2012, 03:02 PM
there is a site that can do this for you, its really good and ive used it before, its called statcounter, as far as i remember its free, plus its invisable :)

here is the link:

http://statcounter.com/

Dan

calstap
02-23-2012, 03:21 PM
I'd like to keep my site running on it's own without need of any "external" services.

There must be some other solution.

But thanks anyways :thumbsup:

MarkR
02-24-2012, 05:10 PM
To reduce the chance of file corruption you could continue with the file idea, but every hour use a cron job to parse all the data from the file to your mysql database, then wipe the file clean. This way the chance of file corruption is lower and your database only takes a performance hit every hour for a few seconds.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum