SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    0 Post(s)
    0 Thread(s)

    Designing of Online status indicator

    I have some experience in asp coding and we have a nice "Help Desk" portal in our company. The only thing it's missing is an online indicator, where people can see online availability of other co-workers and so on.

    I want to keep the portal simple as possible.

    We are using MsSQL as database. There are about 10 users who are going to use the online indicator.

    Login is integrated in AD / LDAP.

    I just dont know where to start making of the online indicator?

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2004
    Nelson BC
    0 Post(s)
    0 Thread(s)
    Simplest way:
    - when user logs in, add their name to an array stored in an application variable. When they logout, remove them.
    - display the status of each user from this array on the page you want.

    This is not very accurate. When a user disconnects without logging out, it won't update. You could use session_onend to help this but it still would have a delay of (default) 20 mins.

    A more accurate way would be to use javascript code with ajax that hits a page on the server every x seconds saying "user x is still logged in". then if you don't receive a response for y seconds, you can assume they have logged out.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts