PDA

View Full Version : [PHP] habboFunctions



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.

timROGERS
09-02-2007, 06:26 PM
Very nice :) Better than my old Habbo Intergration Kit :P

ZAG
09-02-2007, 07:12 PM
Thank you :)

SlicedCheese
10-02-2007, 07:59 PM
cool ill use it thanks:)

Sygon..
10-02-2007, 09:26 PM
Very nice,

thanks

ZAG
10-02-2007, 10:42 PM
Thank you :)

ScottDiamond
10-02-2007, 11:29 PM
what does it do? :S

ZAG
10-02-2007, 11:54 PM
It has several functions that grab data from Habbo Homes.

e.g.



<?php
include('habboFunctions.php');
$habboHome = setHome('co.uk', 'Lost_witness');
$motto = getHabboMotto($habboHome);
echo $motto;
?>


Would output Lost_Witness' motto.

I cant really explain.

ZAG
16-02-2007, 07:49 PM
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

Bryanpie
24-05-2007, 02:46 PM
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??

ZAG
25-05-2007, 07:13 AM
habboFunctions is old. Check out the habbo link in my signature.

Gazzer
29-06-2007, 01:38 PM
habboFunctions is old. Check out the habbo link in my signature.

Sorry but that link doesn't work.

Favourtism
09-02-2010, 09:16 PM
mirror please

Edited by Tomm (Forum Moderator): Please don't bump old threads.

Want to hide these adverts? Register an account for free!