HabboxWiki needs you!
Are you a Habbo buff? Or maybe a rare trader with a bunch of LTDs? Get involved with HabboxWiki to share your knowledge!
Join our team!
Whether you're raving for rares, excited for events or happy helping, there's something for you! Click here to apply
Need a helping hand?
Check out our guides for all things to help you make friends, make rooms, and make money!


Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2007
    Posts
    790
    Tokens
    3,429

    Latest Awards:

    Default [PHP] Server status and online users

    Hi i am making my own game and wanted to add a part to my site with the online status of my game, being online or offline and users online how do i do that? im a basic learner with html and php

  2. #2
    cameron446:'s Avatar
    cameron446: is offline HabboxWiki Staff
    HabboxLive Senior DJ (Music)
    Rare Values Staff
    Guest Events Organiser

    Join Date
    Jul 2015
    Country
    United Kingdom
    Posts
    2,480
    Tokens
    33,256
    Habbo
    cameron446:

    Latest Awards:

    Default

    @scottish;


    Sent from my iPhone using Tapatalk

  3. #3

    Default

    Without a lot more information to base your request off of, it can be very easy to do, or slightly more involved.

    A few questions would be:

    1. How do you want to determine someone's online/offline status? Are you basing it on amount of time "idle" or just based on clicking a logout/login button?

    2. Based on the above, if amount of time is your determination, how long is your "idle" requirement before you want them logged out?

    3. Do you already have a database of users?

    Without much information, your basic setup will be as follows:
    1. Database is created to store users with certain criteria columns you need, I.E online/offline, time stamp (if you're basing it on "idle" time) and so on.
    2. User logs in > session for that user is created and "online" or "time stamp" is set.
    3. User logs out > session for that user is destroyed and "offline" is set or "time stamp" is updated.
    4. User does some sort of activity (based on "idle" time) > check "time stamp" to see if it's over the amount of your "idle" setting, and if so, destroy the session and "time stamp" is updated.
    Using appropriate queries, you can then show users based on their "online" or "time stamp" status.

  4. #4
    Join Date
    Jan 2007
    Posts
    790
    Tokens
    3,429

    Latest Awards:

    Default

    Anyoneee

Posting Permissions

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