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 value from 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?
High traffic website: Log & Hitcounter
Moderator: General Moderators
Re: High traffic website: Log & Hitcounter
I would suggest using a database (mysql) to track the hits. This would get rid of the corruption problem.
Re: High traffic website: Log & Hitcounter
MySQL server is already under heavy usage and I try to keep it at minimum. Site is hosted on shared server with some mysql limits and it's already getting average of 500 queries per second
I'd rather keep it file based, but is there any chance to do it that way?
I'd rather keep it file based, but is there any chance to do it that way?
Re: High traffic website: Log & Hitcounter
Do you not have access to your server's access logs?
Re: High traffic website: Log & Hitcounter
I can download them manually, not "automatically" so it doesn't work either