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 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default [PHP] habboFunctions

    habboFunctions is a PHP script that at the moment contains 11 functions.
    These functions makes grabbing data from Habbo easier and simpler.

    Functions (Alphabetical)
    getHabboBadge
    getHabboBirthdate
    getHabboFigure
    getHabboMotto
    getHabboName
    getHabbosOnline
    habboExists
    isBanned
    isOnline
    isPrivate
    setHome - Most important

    To initialise the script you would put this in your PHP script:

    PHP Code:
    <?php
    include('habboFigure.php');
    ?>
    After that, you cannot just use one of the functions, you have the set a variable as a Habbo Home:

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    ?>
    Lets break this down:

    setHome - The function to set a variable as a habbo home.
    co.uk - The end part of the Hotel's URL (co.uk, us, ca, fi) etc.
    Lost_Witness - The name of the Habbo

    Just entering that wouldn't output anything, and using the echo function would just output all the HTML from the home. This is where you use one of the functions.

    All of the other 10 functions need one parameter:

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    echo 
    getHabboMotto($habboHome);
    ?>

    As you can see, the parameter a variable that has had a Habbo Home set to it.

    In this case, $habboHome

    Using that code would output whatever Lost_Witness' motto is.

    Heres how to use each function.

    getHabboBadge
    This grabs the Habbo's current badge.

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    echo 
    getHabboBadge($habboHome);
    ?>
    This would output the URL to the badge, you could put it in image tags:

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    echo 
    '<img src="'.getHabboBadge($habboHome).'" />'
    ?>

    getHabboBirthdate
    This gets the date the Habbo was created

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    echo 
    getHabboBirthdate($habboHome);
    ?>
    getHabboFigure
    This grabs the Habbo's figure image.

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    echo 
    getHabboFigure($habboHome);
    ?>
    This would output the URL to the figure image, you could put it in image tags:

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    echo 
    '<img src="'.getHabboFigure($habboHome).'" />'
    ?>

    getHabboMotto
    This gets the Habbo's current motto.

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    echo 
    getHabboMotto($habboHome);
    ?>
    getHabboName
    This is useful for getting the Habbo's name in its proper casing.

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    echo 
    getHabboName($habboHome);
    ?>
    getHabbosOnline
    This grabs the current amount of Habbo's online.

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    echo 
    getHabbosOnline($habboHome);
    ?>
    habboExists
    This checks if a Habbo exists.

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    if(
    habboExists($habboHome)){
    echo 
    "The habbo exists";
    }else{
    echo 
    "The habbo doesn't exist";
    }
    ?>
    isBanned
    This checks if a Habbo is banned.

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    if(
    isBanned($habboHome)){
    echo 
    "This habbo is banned";
    }else{
    echo 
    "This habbo is not banned";
    }
    ?>
    isOnline
    This checks if a Habbo is online.

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    if(
    isOnline($habboHome)){
    echo 
    "This habbo is online";
    }else{
    echo 
    "This habbo is not online";
    }
    ?>
    isPrivate
    This checks if a Habbo's home is set to private

    PHP Code:
    <?php
    include('habboFigure.php');
    $habboHome setHome('co.uk''Lost_Witness');
    if(
    isPrivate($habboHome)){
    echo 
    "This habbo's home is set to private";
    }else{
    echo 
    "This habbo's home is not set to private";
    }
    ?>
    Obviously you can use more than one function.

    If you do not understand or need help, PM me. I will be adding more functions later.

    http://iamthomas.uk.to/habboFunctions.zip

    Thread closed by Tomm (Forum Moderator): Due to bump.
    Last edited by Tomm; 09-02-2010 at 09:20 PM.

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

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

    Latest Awards:

    Default

    Very nice Better than my old Habbo Intergration Kit



    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)


  3. #3
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    Thank you

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

  4. #4
    Join Date
    Dec 2004
    Posts
    121
    Tokens
    0

    Default

    cool ill use it thanks

  5. #5
    Join Date
    Dec 2006
    Posts
    521
    Tokens
    0

    Default

    Very nice,

    thanks

  6. #6
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    Thank you

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

  7. #7
    ScottDiamond Guest

    Default

    what does it do? :S

  8. #8
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    It has several functions that grab data from Habbo Homes.

    e.g.

    PHP Code:
    <?php
    include('habboFunctions.php');
    $habboHome setHome('co.uk''Lost_witness');
    $motto getHabboMotto($habboHome);
    echo 
    $motto;
    ?>
    Would output Lost_Witness' motto.

    I cant really explain.

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

  9. #9
    Join Date
    Jan 2007
    Location
    West Yorkshire
    Posts
    384
    Tokens
    0

    Default

    MY reseller went down and the link didnt work so the download link is:

    http://thomas.uk.to/habboFunctions.zip

    or Uploadz mirror

    http://www.uploadz.co.uk/114habbofunctions.zip

    “two players, two sides.
    one is light, one is dark.”
    - John Locke

  10. #10
    Join Date
    May 2007
    Posts
    3
    Tokens
    0

    Question where the name?

    Where do i have to put the habboname in the URL??

    http://mydomain.com/habbo.php?name=Bryanpie ??
    That doesn't work.

    And the script doesn't work for the Dutch Habbo i think,, why not??

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
  •