Results 1 to 9 of 9
  1. #1
    Join Date
    Oct 2004
    Location
    Wales, UK
    Posts
    974
    Tokens
    1,450
    Habbo
    icebox12

    Latest Awards:

    Default How many are online...

    I need the code for it, I have one but it's rather long. Can anyone remember the shorter code?

    PHP Code:
    $remote $_SERVER["REMOTE_ADDR"];

    $file "log.txt"
    ;
    $timeoutsecs 30;

    $timestamp time();

    $timeout = ($timestamp-$timeoutsecs);

    $fp fopen("$file""a+");

    $write $remote."||".$timestamp."n";
    fwrite($fp$write);
    fclose($fp);

    $online_array = array();
    $file_array file($file);

    foreach(
    $file_array as $newdata){
    list(
    $ip$time) = explode("||"$newdata);
    if(
    $time >= $timeout){
    array_push($online_array$ip);
    }
    }

    $online_array array_unique($online_array);

    $online count($online_array);
    if (
    $online == "1") {
    echo 
    "People Online: $online";

    } else {

    echo 
    "People Online: $online";
    }
    ?> 
    --
    Regards
    The one and only

    Instagram (/needsy)
    Twitter

  2. #2
    Join Date
    Jun 2005
    Location
    Y shud i tell u ?
    Posts
    2,730
    Tokens
    0

    Latest Awards:

    Default

    online for what

  3. #3
    Join Date
    Jun 2005
    Posts
    2,688
    Tokens
    0

    Latest Awards:

    Default

    I think he means how many people are actually viewing the webpage at any one time.

  4. #4
    Join Date
    Oct 2004
    Location
    Wales, UK
    Posts
    974
    Tokens
    1,450
    Habbo
    icebox12

    Latest Awards:

    Default

    Quote Originally Posted by Baving
    I think he means how many people are actually viewing the webpage at any one time.
    Exactly :eusa_ange
    The one and only

    Instagram (/needsy)
    Twitter

  5. #5
    Join Date
    May 2005
    Location
    Cornwall
    Posts
    3,590
    Tokens
    2,900
    Habbo
    Feyod

    Latest Awards:

    Default

    EDIT: Hangon ;o Im mistaken for how many habbos are in the hotel :p

    Meh, sorry, i thought i knew it but i don't
    Occasionally visit and have a nose.

  6. #6
    Join Date
    Dec 2004
    Location
    Essex, UK
    Posts
    3,285
    Tokens
    0

    Latest Awards:

    Default

    I can do the how many habbos one, I worked that out ages ago



    i used to be NintendoNews. visit my blog or add me on twitter.
    need help with vista? i am a microsoft certified technology specialist in configuring windows vista and connected home integrator.. pm me for help!


    "I am the way, the truth, and the life. No one comes to the Father except through me"
    John 14:6 (NIV)


  7. #7
    Join Date
    Oct 2004
    Location
    Wales, UK
    Posts
    974
    Tokens
    1,450
    Habbo
    icebox12

    Latest Awards:

    Default

    Quote Originally Posted by Tim
    I can do the how many habbos one, I worked that out ages ago
    Agreed, I know that but simple need the code to display how many habbo's are visiting a certain website.
    The one and only

    Instagram (/needsy)
    Twitter

  8. #8
    Join Date
    May 2005
    Location
    Cornwall
    Posts
    3,590
    Tokens
    2,900
    Habbo
    Feyod

    Latest Awards:

    Default

    Quote Originally Posted by icebox12
    Agreed, I know that but simple need the code to display how many habbo's are visiting a certain website.
    Check the source code off Habbox's? :p
    Occasionally visit and have a nose.

  9. #9
    Join Date
    Jun 2005
    Location
    Manchester
    Posts
    3,187
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Steven.
    Check the source code off Habbox's? :p
    PHP Isn't viewable in the source code.

    Matt, i'll write one up and then post it too you on MSN.

    - Dan

Posting Permissions

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