This seems like it should be fairly straight forward but I'm having a devil of a time with it. Hoping some of you fine folks might be able to lend a hand.
I'm using PHP & MySQL, and want to calculate the flow rates of traffic to certain web pages. Ultimately I want to be able to send myself alerts when flow rates rise or fall dramatically over certain time periods. For now I'm thinking I would like to monitor at 5 min, 30min, 60 min, 5 hour, and 24 hour intervals.
The "easy" way to do this would probably be to record every single page request as a separate timestamped entry in my DB and then just count them and do various date diff calculations etc. But I really don't want to create a new row for every request. I would rather just increment counters and work off of those, but I'm completely stumped at the moment.
What would be the easiest way to go about this? My attempts thus far have been so far from the mark that I don't even have any code worth sharing.