Announcement

Collapse
No announcement yet.

Who's Online Help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Who's Online Help

    I am setting up a user authenticiation feature for my site and so far, it's going pretty good. I'm using PHP and MySQL. I've finished just about everything and I'm still adding a few features the the memberlist. But there's one thing I can't figure out. How would you go about doing a "Who's Online" feature?

  • #2
    Please follow the instructions in the last line of my sig to show you are a licensed customer. Thanks!
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Gee, thanks....

      Thanks for answering my question...

      Comment


      • #4
        And thank you for your cooperation!
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          hrm...

          I tried to cooperate but it doesn't work when I click your link.
          Can't you just answer my question?

          Comment


          • #6
            hmm
            why not?
            just fill in your customer number and password details and you will get support, like Steve as said.
            You're my Prince of Peace
            And I will live my life for You

            Comment


            • #7
              u dont have to own a vB to use these forums do ya?

              if he wants to make an independant who's online script then surely thats y the mysql forums r here?

              if he is trying to meddle with the vB code then i understand y u want to know his details, but else, wot difrence does it make whether he owns a vB or not?

              Comment


              • #8
                no

                no

                to me it does
                You're my Prince of Peace
                And I will live my life for You

                Comment


                • #9
                  Originally posted by nuno
                  no

                  no

                  to me it does
                  i c ur just pickin a fite, had i been 7 years younger i'd have probably obliged.

                  if he is asking for help with a PHP script he is making, I don't understand why you want to know what version of vB he is using.

                  say he doesn't own one, just like I don't, why should that stop us asking for help on a forum that is made solely for help with PHP?

                  i'm sorry if the member list he is talking about is the vB one, but if it's one of his own, then whether he owns the board or not shouldn't be an issue.

                  Comment


                  • #10
                    licensed members get priority, whether you like it or not
                    You're my Prince of Peace
                    And I will live my life for You

                    Comment


                    • #11
                      Originally posted by nuno
                      licensed members get priority, whether you like it or not
                      i'm not tellin u to help him, i'm not even asking, but i dont think hes asking about vB

                      Comment


                      • #12
                        *cough*
                        PHP Code:
                        $result=mysql_query("SELECT * FROM users");
                        while(
                        $userlist=mysql_fetch_array($result)){
                        if((
                        $date-$userlist[onlinetime])<=1000){     //THIS IS 10 minutes deviation
                        if($onlinelist<>""){
                        $onlinelist.=", $userlist[username]";
                        }else{
                        $onlinelist="$userlist[username]";
                        }
                        }
                        }
                        if(
                        $onlinelist==""){
                        $onlinelist="Noone";
                        }
                        echo 
                        "$onlinelist"
                        *cough*

                        then in your header file or every page of your site, when the user is logged in...

                        *cough*
                        PHP Code:
                        $date=gmstrftime("%Y%m%d%H%M%S");
                        if(
                        $siteuserid<>""){
                        mysql_query("UPDATE users SET onlinetime='$date' WHERE userid=$siteuserid");

                        *cough*

                        of course, I'm not giving any hints on how to make a who's online script, I've just got a nasty cough
                        Last edited by Steviepowers; Mon 1 Apr '02, 10:27am.

                        Comment

                        Related Topics

                        Collapse

                        Working...
                        X