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:
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');
?>
Lets break this down:PHP Code:<?php
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
?>
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.
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 getHabboBadge($habboHome);
?>
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
getHabboFigurePHP Code:<?php
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo getHabboBirthdate($habboHome);
?>
This grabs the Habbo's figure image.
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 getHabboFigure($habboHome);
?>
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.
getHabboNamePHP Code:<?php
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo getHabboMotto($habboHome);
?>
This is useful for getting the Habbo's name in its proper casing.
getHabbosOnlinePHP Code:<?php
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo getHabboName($habboHome);
?>
This grabs the current amount of Habbo's online.
habboExistsPHP Code:<?php
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo getHabbosOnline($habboHome);
?>
This checks if a Habbo exists.
isBannedPHP 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";
}
?>
This checks if a Habbo is banned.
isOnlinePHP 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";
}
?>
This checks if a Habbo is online.
isPrivatePHP 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";
}
?>
This checks if a Habbo's home is set to private
Obviously you can use more than one function.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";
}
?>
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.







Better than my old Habbo Intergration Kit




