Forum Moderators: coopster

Message Too Old, No Replies

php code for unique users in past **** mins

         

rlkanter

3:38 am on Jul 11, 2004 (gmt 0)

10+ Year Member



For a site that doesn't keep user sessions, is there an easy way to do this? I basically just want to be able to display how many unique users have accessed a specific php function in the last 15 minutes. I guess I could use a db to keep track of each access with a timestamp. I was just wondering if there is an easier way to do this.

Thanks.

jaski

1:40 pm on Jul 11, 2004 (gmt 0)

10+ Year Member



There are alternative ways but db is the easiest. Alternatives are plain text file .. you will have to lock and unlock it every time to avoid multiple users updating at the same time. There is some thing called shared memory functions in php which can be used as well.

rlkanter

5:39 pm on Jul 11, 2004 (gmt 0)

10+ Year Member



I don't want to play around with read/writing to a plain text file so I guess I'll use a db to handle it. Thanks.