Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Script That Tracks The User Status, how can I track on or offline users?
arcticsnpr
post 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
Go to the top of the page
 
+Quote Post
Spectre
post 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);
Go to the top of the page
 
+Quote Post
arcticsnpr
post 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!
Go to the top of the page
 
+Quote Post
peo
post 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.

Go to the top of the page
 
+Quote Post
iGuest
post 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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Many Php Script Sites(16)
  2. Testing Php?(12)
  3. I.p. Ping Online Or Offline(6)
  4. Script: Php Jukebox(4)
  5. Parse: Error Unexpected T_lnumber(4)
  6. Watermark Your Image With Simple Php Script(35)
  7. Free Auction Script(6)
  8. Wappy Buddy V1.10 - Tibia Gold Edition By Wappy & Jon Roig(3)
  9. What Kind Of Script Do You Need ?(15)
  10. Creatting A Playlist Through Php(5)
  11. Very Simple Online Now Script(4)
  12. Html Code Tester. Online Script(15)
  13. Php Downloads Script(4)
  14. Script Help Required: Undefined Variable(3)
  15. Php Ftp Upload Form(1)
  1. Library Script(6)
  2. How Would I Go About Making A Simple "counting" Script?(3)
  3. Forum Script(3)
  4. Php Rediret Script(12)
  5. Download Script For Mp3 Files(0)
  6. How Do I Connect To Live Database With Php Script?(6)
  7. Need Help Installing Dolphin Community Script!(5)
  8. Unexpected T_string In User.php [resolved](5)
  9. Guessing Php Script(2)
  10. How To Make A View New Post Script?(5)
  11. How To Print In Php(9)
  12. Php Guest Online Script(3)
  13. How To Make Php Newsletter Script(3)


 



- Lo-Fi Version Time is now: 13th October 2008 - 05:45 PM