|
|
|
|
![]() ![]() |
Jun 1 2006, 07:08 PM
Post
#1
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 27 Joined: 5-April 06 Member No.: 21,363 |
long explaination: hey, I'm building a user profile site right now. And, I kinda know how to make a online/offline detector, but not totally sure. I know I can make a mysql database to track them, but how does it entrer the information? I could easily put in a field where when they login it sets them to online, but if they don't sign out, and just exit the browser, how can I tell.
short: I want someone to tell me how to make a online/offline status detector, like they have here on trap17. I'd be thrilled if you can post to this, thanks, arcticsnpr |
|
|
|
Jun 1 2006, 09:09 PM
Post
#2
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 873 Joined: 30-July 04 Member No.: 246 |
The way most such systems work is simply by storing a timestamp of the user's last activity in the database, and when they have been inactive for a certain amount time - say, 20 minutes - just assuming they are offline. There is no universally reliable method of actually knowing when they are currently looking at your site. You could take it a step further and have all pages automatically refresh at certain intervals, so as to ensure they remain active.
Quick example: CODE $timestamp = time() - (20*60); // Where 20 = minutes.
@mysql_query('UPDATE user_table SET user_online_field = 0 WHERE user_last_active_field <= ' . $timestamp); |
|
|
|
Jun 2 2006, 02:47 AM
Post
#3
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 27 Joined: 5-April 06 Member No.: 21,363 |
you rock spectre! thanx so much!
|
|
|
|
Jun 2 2006, 02:18 PM
Post
#4
|
|
|
Member [Level 2] ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 88 Joined: 9-March 06 Member No.: 19,769 |
I made a script the other day using Diamond.exe program. This program is the easiest one ive ever tried- it spared me loads of time. To configure suffix vs prefix takes ages modifying manually, finally i found this program which ties them together - connects them - Scripting because a lot easier!
Perhaps this is off topic - sorry for that - just had to inform you scripters about it. Diamond.exe originally costs 500$ for a validation of 3 computers - database - sql - including free life time hosting and infinite domains. Dont tell me how i got this offer - its just amazing. |
|
|
|
Dec 27 2007, 12:03 PM
Post
#5
|
|
|
Hail Caesar! ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 5,876 Joined: 21-September 07 Member No.: 50,369 |
User Status
Script That Tracks The User Status I'm looking for a script that would allow a user to log into a web site and change their status (red/green) for a particular date and have the rest of the group be notified by email. Any ideas? Thanks, Mike -Mike |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 13th October 2008 - 05:45 PM |