Jump to content
xisto Community
Sign in to follow this  
arcticsnpr

Script That Tracks The User Status how can I track on or offline users?

Recommended Posts

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 Xisto.I'd be thrilled if you can post to this, thanks, arcticsnpr

Share this post


Link to post
Share on other sites

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:

$timestamp = time() - (20*60); // Where 20 = minutes.@mysql_query('UPDATE user_table SET user_online_field = 0 WHERE user_last_active_field <= ' . $timestamp);

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.