www.webdeveloper.com
Results 1 to 5 of 5

Thread: Setup a basic live-chat area on website.

  1. #1
    Join Date
    Jun 2008
    Posts
    207

    Setup a basic live-chat area on website.

    Hi, I want to create an area on my site so that users can chat live to a representative in my office.

    I'm wondering if I should be using PHP sessions and ajax?

    Is it possible to view how many PHP sessions are open and access the variables from a separate session. Or should I be thinking of a completely different way around this?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2009
    Posts
    3,346
    If you moved session management in a db you could easily identify all active sessions using a simple query.

  3. #3
    Join Date
    Jun 2008
    Posts
    207
    Thanks for the response. How would I clear out the db of dropped sessions?

  4. #4
    Join Date
    Jan 2009
    Posts
    3,346
    If you use any number of db based session management scripts. If you don't want to get that involved you can just use an "active" table with userIDs and last action time. Then whenever you build your list of users that are online you mark inactive any row where the date is in the past by 5 minutes or whatever.

  5. #5
    Join Date
    Jun 2008
    Posts
    207
    Thanks for the advice.
    Last edited by coldscooter; 08-20-2009 at 04:45 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles