ZAG
09-02-2007, 06:24 PM
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
include('habboFigure.php');
?>
After that, you cannot just use one of the functions, you have the set a variable as a Habbo Home:
<?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
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
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
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo '<img src="'.getHabboBadge($habboHome).'" />'
?>
getHabboBirthdate
This gets the date the Habbo was created
<?php
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo getHabboBirthdate($habboHome);
?>
getHabboFigure
This grabs the Habbo's figure image.
<?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
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo '<img src="'.getHabboFigure($habboHome).'" />'
?>
getHabboMotto
This gets the Habbo's current motto.
<?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
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo getHabboName($habboHome);
?>
getHabbosOnline
This grabs the current amount of Habbo's online.
<?php
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo getHabbosOnline($habboHome);
?>
habboExists
This checks if a Habbo exists.
<?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
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
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
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.
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
include('habboFigure.php');
?>
After that, you cannot just use one of the functions, you have the set a variable as a Habbo Home:
<?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
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
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
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo '<img src="'.getHabboBadge($habboHome).'" />'
?>
getHabboBirthdate
This gets the date the Habbo was created
<?php
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo getHabboBirthdate($habboHome);
?>
getHabboFigure
This grabs the Habbo's figure image.
<?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
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo '<img src="'.getHabboFigure($habboHome).'" />'
?>
getHabboMotto
This gets the Habbo's current motto.
<?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
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo getHabboName($habboHome);
?>
getHabbosOnline
This grabs the current amount of Habbo's online.
<?php
include('habboFigure.php');
$habboHome = setHome('co.uk', 'Lost_Witness');
echo getHabbosOnline($habboHome);
?>
habboExists
This checks if a Habbo exists.
<?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
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
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
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.