LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-08-2004, 06:00 AM   #1
maseby
Member
 
Registered: Oct 2003
Posts: 42

Rep: Reputation: 15
Unhappy PHP experts help!!!!


been trying to create an ONLINE LIST for my website, so that one can see who is online and who's not, with out any real progress...


I wonder if there are any scripts out there for me to use...submit some links guys for finished PHP ONLINE SCRIPTS.....
 
Old 07-08-2004, 06:27 AM   #2
datprogrammer
LQ Newbie
 
Registered: Jul 2004
Posts: 15

Rep: Reputation: 0
Shouldn't be too hard...

I assume you;re requiring users to log on? if so, why not just have a mySQL table that tracks "users logged on" - columns could be
username varchar(20),
loggedonat DATETIME
lastaccess DATETIME

Everytime they log on, you write a row to this table, and if they explicitly log off, delete the row. Assume some sensible timeout value for people leaving the site without logging off (10 minutes maybe).

Then all you have to do is have a little php function to select the names off this table where lastaccess is less than your timeout value and there's your list of logged on memebrs...

Probably a good idea to also have some sort of cleanup function that deletes all records with an old lastaccess time

That's how I would go about it anyways.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Please, anyone of experts, help me !!! Vladlenas Linux - Hardware 7 05-05-2006 09:17 PM
Linux: By Experts - For Experts Cinematography General 10 05-12-2005 03:14 AM
PHP experts help!!!! maseby Programming 2 05-21-2004 02:34 PM
for FS Experts brig_sam Linux - Hardware 2 10-01-2003 06:05 AM
Experts Tell me what i did is right??? boon Linux - Software 2 09-14-2003 10:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration