Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18
  1. #11
    Join Date
    Apr 2008
    Posts
    5
    Tokens
    0

    Default

    Displaying how many users are on your site is quite simple. I cannot be bothered posting seeing as I'm kind of eating, yet I advise you to view: http://www.roscripts.com/How_many_vi...cript-108.html

  2. #12
    Join Date
    Aug 2005
    Location
    London
    Posts
    9,773
    Tokens
    146

    Latest Awards:

    Default

    Quote Originally Posted by Xtra View Post
    Displaying how many users are on your site is quite simple. I cannot be bothered posting seeing as I'm kind of eating, yet I advise you to view: http://www.roscripts.com/How_many_vi...cript-108.html
    That's the code you'd use if you were to want a online users counter on your own site. Seeing as we can't write PHP onto the Habbo servers ourselves we just use the code in the original post to take the amount off the actual homepage. Both are completely different scripts .

  3. #13
    Join Date
    Apr 2008
    Posts
    429
    Tokens
    0

    Default

    thanks guys.
    KYLE SMITH

  4. #14
    Join Date
    Feb 2007
    Location
    UK
    Posts
    56
    Tokens
    0

    Default

    Anyone got the current code for this?
    Ty in advance

  5. #15
    Join Date
    Oct 2005
    Location
    Melbourne, Australia
    Posts
    7,554
    Tokens
    0

    Latest Awards:

    Default

    As i sent to you in PM:

    PHP Code:
    <?php
    $hotel 
    file_get_contents("http://www.habbo.co.uk/");
        
    $start explode('<span class="stats-fig">'$hotel2);
    $end explode('</span>'$start[1], 2);
    $habbo trim($end[0]);

    echo(
    "Habbos online: $habbo");
    ?>

  6. #16
    Join Date
    Feb 2007
    Location
    UK
    Posts
    56
    Tokens
    0

    Default

    would it work if i host this scrpt on **********?

    Or if not, anyone know where i can host it for free?

  7. #17
    Join Date
    Nov 2006
    Location
    Coventry
    Posts
    479
    Tokens
    1,292

    Default

    This is just what I needed,
    thanks!

    - Lee
    Student Pilot EGBW | Cessna 152 G-BHPY G-BTVW
    Passed Air Law exam April 25th

  8. #18
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    Is a bit more efficient, unfortunately habbo.com isn't a fan of file_get_contents any more.
    PHP Code:
    <?php
    $page 
    file_get_contents("http://www.habbo.fr"); // Change the URL to the hotel you would like
    $pattern '/<span class="stats-fig">(.*?)<\/span>/s';
    preg_match$pattern $page $out );
    echo 
    "There are $out[1] Habbos online!"// Set the message you want to be displayed (Leave in the $amount)
    ?>
    Chippiewill.


Page 2 of 2 FirstFirst 12

Posting Permissions

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