PDA

View Full Version : Easy way to pull a habbo motto



GoldenMerc
28-09-2011, 05:41 PM
Hi,

Is there a easy way to pull a Habbo motto, e.g to pull a habbo character its this;
http://www.habbo.com/habbo-imaging/avatarimage?user=GoldenMerc&action=std&direction=&head_direction=2&gesture=std&size=l&img_format=gif
Ross

-Danube-
28-09-2011, 06:19 PM
Hi,

Is there a easy way to pull a Habbo motto, e.g to pull a habbo character its this;
http://www.habbo.com/habbo-imaging/avatarimage?user=GoldenMerc&action=std&direction=&head_direction=2&gesture=std&size=l&img_format=gif
Ross

I don't think there is a way to do it in url form or anything like that.

Although there is a very easy way to do it by using a small PHP script. Just do a file_get_contents() on their habbo home page (using the username as a variable in the link) and then just explode() everything appropriately and you should easily get the motto in a few lines of code.

Dentafrice
30-09-2011, 06:45 AM
Plenty of easier ways to do this, regex, etc:



$habbo_name = @$_GET["habbo_name"];
if(empty($habbo_name)) { exit("No name specified.");}
$file = @file_get_contents("http://www.habbo.com/home/{$habbo_name}");
if(!$file) { exit("Cannot get motto at this time.");}
$motto = explode('motto">', $file);$motto = explode('<div', $motto[1]);$motto = trim($motto[0];
echo $motto;

---------- Post added 30-09-2011 at 02:45 AM ----------

Habbox really messes the PHP up.. gay.

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