Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in PHP only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
PHP
How to count online users and guest for the last 30 minutes?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
fpjkaba
New Member
Join Date:
Mar 2009
Posts:
5
#1
How to count online users and guest for the last 30 minutes?
Mar 13 '09, 09:22 AM
How to count online users and guests for the last 30 minutes on my site?
I'm using mysql, php and apache for windows.
Thanks.
Dormilich
Recognized Expert
Expert
Join Date:
Aug 2008
Posts:
8694
#2
Mar 13 '09, 10:31 AM
either check the server's logfiles or write a script that is called in every page and collects the data on request.
Comment
Post
Cancel
fpjkaba
New Member
Join Date:
Mar 2009
Posts:
5
#3
Mar 13 '09, 10:58 AM
Is it enough that I collect only the IP address and store it in DB? If not what more data should I collect?
Thanks!
Comment
Post
Cancel
Dormilich
Recognized Expert
Expert
Join Date:
Aug 2008
Posts:
8694
#4
Mar 13 '09, 11:02 AM
for a basic counter this should be enough. anyways, the more data you collect, the better will you statistic be.
If you're fine with it, you can use one of the countless counters* available. this will save you the trouble of programming it yourself.
* what a pun.....
Comment
Post
Cancel
Markus
Recognized Expert
Expert
Join Date:
Jun 2007
Posts:
6092
#5
Mar 13 '09, 11:12 AM
You're also going to need to store the time the user visits, too..
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment