Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Nov 2005
    Location
    Australia
    Posts
    1,086
    Tokens
    111

    Latest Awards:

    Default Counters and such

    Ok, I need somebody to tell me the script for "Habbo's In Hotel". So how many habbos are checked in. I know its PHP, I've had it before but I've losted it. I'm also looking for a hit counter script, simple so every time someboody goes onto the site it adds a hit to the counter. Also, how many users are online (on my site). If you could reply with the codes, that would be most helpful. Thanks.

  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    This has all been said before.


    Ok. First 2 are easy, (users online + hit counter) both scripts can be found in my tutoral
    http://thybag.co.uk/index.php?p=Tutorials&ind=25&page=2
    hits is first and users online/today is underneath

    Habbo online counter, is still in progress, as in where no sure its grabing the right line of code
    PHP Code:
    <?php
    //get page
    $lines file('http://www.habbohotel.co.uk/');

    //Get line
    $Ndata $lines['71']; // may be line 72 or 70 - try till one works

    //Remove what we dont want
    $Ndata str_replace('<div id="toolbar-habbocount">'''$Ndata);
    $Ndata str_replace("Habbos online</div>"""$Ndata);

    // Add text and output
    echo "Current Habbos Online: ".$Ndata;
    ?>
    So try a few lines and see if any work

  3. #3
    Join Date
    Feb 2006
    Location
    Coventry
    Posts
    2,096
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by 01101101entor
    This has all been said before.


    Ok. First 2 are easy, (users online + hit counter) both scripts can be found in my tutoral
    http://thybag.co.uk/index.php?p=Tutorials&ind=25&page=2
    hits is first and users online/today is underneath

    Habbo online counter, is still in progress, as in where no sure its grabing the right line of code
    PHP Code:
    <?php
    //get page
    $lines file('http://www.habbohotel.co.uk/');
     
    //Get line
    $Ndata $lines['71']; // may be line 72 or 70 - try till one works
     
    //Remove what we dont want
    $Ndata str_replace('<div id="toolbar-habbocount">'''$Ndata);
    $Ndata str_replace("Habbos online</div>"""$Ndata);
     
    // Add text and output
    echo "Current Habbos Online: ".$Ndata;
    ?>
    So try a few lines and see if any work
    Carl what does str_replace do,

  4. #4
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    replace a string with something else.

    Its getting the line off habbos site which is
    <div id="toolbar-habbocount"> 10,000 Habbos online</div>

    or whatever, and the str repaces basicly rmove everything but the number.
    So you can add what ever prefix/suffix u like

  5. #5
    Join Date
    Feb 2006
    Location
    Coventry
    Posts
    2,096
    Tokens
    0

    Latest Awards:

    Default

    Thanks im on my long mile to learning php reading a book called sams php 5 unleased lol

  6. #6
    Join Date
    Apr 2006
    Posts
    21
    Tokens
    0

    Default

    Btw thats easy code, anyone got code for .com and .ca stats?





  7. #7
    Join Date
    Feb 2006
    Location
    Coventry
    Posts
    2,096
    Tokens
    0

    Latest Awards:

    Default

    mayb e change the .co.uk to .com?

  8. #8
    Join Date
    Apr 2006
    Posts
    21
    Tokens
    0

    Default

    Quote Originally Posted by sygon.net
    mayb e change the .co.uk to .com?
    nah the lines are different ;[





  9. #9
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Quote Originally Posted by `m_>
    Btw thats easy code, anyone got code for .com and .ca stats?
    You call it easy when u cant modife it that simply.


    Changes, diffent line.
    Diffent url.
    Diffent tags.
    PHP Code:
    <?php
    //get page
    $lines file('http://www.habbohotel.com/habbo/en/');

    //Get line
    $Ndata $lines['610']; // may be line 611 or 609 - try till one works

    //Remove what we dont want
    $Ndata str_replace('<span class="white">'''$Ndata);
    $Ndata str_replace("</span></b></td>"""$Ndata);

    // Add text and output
    echo "Current Habbos Online: ".$Ndata;
    ?>
    I think thats the right line, testing will be needed to make sure
    Last edited by Mentor; 12-04-2006 at 02:07 PM.

  10. #10
    Join Date
    Oct 2006
    Posts
    2,918
    Tokens
    946
    Habbo
    Verrou

    Latest Awards:

    Default

    BUMMMMMPPPP!
    Lines for AU? I'm a n33b at PHP,
    Thankles,

    Ver.
    Quote Originally Posted by Special-1k View Post
    How do you uninstall an internet? I want to uninstall my Google Chrome and
    get firefox but I never really got rid of an internet my dad usually did it for me.
    If you know how post below so I can do this.

Page 1 of 2 12 LastLast

Posting Permissions

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