View Full Version : Using the new Habbo Imager to find how a Habbo looks for your website
Halting
17-11-2006, 08:45 PM
Hey,
I know not many fansites have figured out how to use the new Habbo Imager to provide a live picture of how a Habbo is dressed yet. However, soon enough, every fansite will discover how it can be done.
I was fiddling around with the 'Habbo's Online' feature. My idea was to visit the Habbo Home of the Habbo you want you look for, find their Habbo ID which can be found in the image source of their image and then transfer it onto my website.
<?PHP
$page = file_get_contents("http://www.habbo.co.uk/home/$_GET[name]");
eregi("<img alt=\"$_GET[name]\" src=\"/habbo-imaging/avatar/(.*).gif\" />", $page, $result);
$name = $_GET[name];
$url = "http://www.habbo.co.uk/habbo-imaging/avatar/$result[1].gif";
echo("$url");
?>
Use the PHP I have provided above. Save it under something along the lines of habbo.php. Then visit /habbo.php?name=yourhabbousername.
What you will find is the URL of their Habbo picture. This is the URL you want to use as your image source, for whatever page you wish to show the image on.
If you don't understand what I'm trying to say, or how it works, please respond to this thread.
Meanwhile, Happy Habboing!
Halting
Panther
17-11-2006, 08:51 PM
It works for me thanks +rep
Halting
17-11-2006, 08:57 PM
Awesome. Thank you :)
Nick.
17-11-2006, 08:58 PM
Hey,
I know not many fansites have figured out how to use the new Habbo Imager to provide a live picture of how a Habbo is dressed yet. However, soon enough, every fansite will discover how it can be done.
I was fiddling around with the 'Habbo's Online' feature. My idea was to visit the Habbo Home of the Habbo you want you look for, find their Habbo ID which can be found in the image source of their image and then transfer it onto my website.
<?PHP
$page = file_get_contents("http://www.habbo.co.uk/home/$_GET[name]");
eregi("<img alt=\"$_GET[name]\" src=\"/habbo-imaging/avatar/(.*).gif\" />", $page, $result);
$name = $_GET[name];
$url = "http://www.habbo.co.uk/habbo-imaging/avatar/$result[1].gif";
echo("$url");
?>
Use the PHP I have provided above. Save it under something along the lines of habbo.php. Then visit /habbo.php?name=yourhabbousername.
What you will find is the URL of their Habbo picture. This is the URL you want to use as your image source, for whatever page you wish to show the image on.
If you don't understand what I'm trying to say, or how it works, please respond to this thread.
Meanwhile, Happy Habboing!
Halting
Bonjour Oli. Nice to see a helping hand around. + rep.
Flumples
17-11-2006, 09:00 PM
Does that pic update everytime the habbo changes clothes?
& Can you get it so the habbo faces forward?
*php noob* (:
Halting
17-11-2006, 09:01 PM
I don't think so, because I'm just transfering the ID of the image from the Habbo Home to my website. Unless the image on their Habbo Home changes, I don't think it's possible :( Sorry Sam!
Kymux
17-11-2006, 09:01 PM
How again?
Somebody make it easier.
Nick.
17-11-2006, 09:01 PM
Does that pic update everytime the habbo changes clothes?
& Can you get it so the habbo faces forward?
*php noob* (:
Yes, it does update everytime the Habbo changes clothes. It's a live image.
The face direction used to be able to be changed, :s
tekni
17-11-2006, 09:03 PM
I congratulate you.
Well done.
Also, +Rep for the Dentafrice comment.
Panther
17-11-2006, 09:03 PM
Say Again lol mine does this :S http://www.habbostudio.hostfreeweb.info/habbo.php?name=Jagus
Halting
17-11-2006, 09:04 PM
@Lost
Save the following PHP into a document named habbo.php.
<?PHP
$page = file_get_contents("http://www.habbo.co.uk/home/$_GET[name]");
eregi("<img alt=\"$_GET[name]\" src=\"/habbo-imaging/avatar/(.*).gif\" />", $page, $result);
$name = $_GET[name];
$url = "http://www.habbo.co.uk/habbo-imaging/avatar/$result[1].gif";
echo("$url");
?>
OK. Now visit /habbo.php?name=Your Habbo username goes here. For instance, /habbo.php?name=Halting.
You will see a URL. Something like http://www.habbo.co.uk/habbo-imaging/avatar/80221180238042128501300050144009fe789d8d83b717dcf6 5e7f494d626d7.gif.
This is the URL you want to use for your image source.
If you want to know how to make this your image source, just ask.
Kymux
17-11-2006, 09:05 PM
Mine does this
www.morningsunshine.net/habbo2.php?=huddle
Halting
17-11-2006, 09:05 PM
You need to put ?name=huddle
Like so:
http://www.morningsunshine.net/habbo2.php?name=huddle
Kymux
17-11-2006, 09:07 PM
YAY TY +REP!
how do i insert that into an image tag?
Panther
17-11-2006, 09:07 PM
Yeh then look at it:
http://www.morningsunshine.net/habbo2.php?name=huddle
Halting
17-11-2006, 09:08 PM
Yes. That's what you're after.
Now make another page and, where you want the image to appear, insert this code:
<img src="<?PHP include("http://www.morningsunshine.net/habbo2.php?name=huddle"); ?>" />
Panther
17-11-2006, 09:12 PM
Im confused mine comes up as:: http://www.habbostudio.hostfreeweb.info/habbo2.php
Halting
17-11-2006, 09:14 PM
<?PHP
$page = file_get_contents("http://www.habbo.co.uk/home/$_GET[name]");
eregi("<img alt=\"$_GET[name]\" src=\"/habbo-imaging/avatar/(.*).gif\" />", $page, $result);
$name = $_GET[name];
$url = "http://www.habbo.co.uk/habbo-imaging/avatar/$result[1].gif";
echo("<img src=\"$url\">");
?>
Replace what you've got inside habbo.php so far with the code above.
Panther
17-11-2006, 09:16 PM
Look:
http://www.habbostudio.hostfreeweb.info/habbo.php
http://www.habbostudio.hostfreeweb.info/habbo2.php
Halting
17-11-2006, 09:17 PM
http://www.habbostudio.hostfreeweb.info/habbo.php?name=huddle
YouFail
17-11-2006, 09:17 PM
Right I have it working.
Simple.
www.rksoftware.swainhosting.com/habbo1.php?name=r
You need to use this as habbo1.php
<img src="<?include ("habbo.php"); ?>" alt="" />
There you go. Not hard at all.
Panther
17-11-2006, 09:19 PM
lol :P
Halting
17-11-2006, 09:19 PM
Everything working now Panther?
YouFail
17-11-2006, 09:21 PM
My gosh. The difficulty. Sorry if im offensive but it was one line of freakin code.
Halting
17-11-2006, 09:22 PM
lol :)
If you're going to use it on a staff page it could take a while to load.
Panther
17-11-2006, 09:26 PM
Lol Im crap at php :p
YouFail
17-11-2006, 09:26 PM
Just looked at the code again. There is a way to do it on one page. Very simplely.
<?PHP
$page = file_get_contents("http://www.habbo.co.uk/home/$_GET[name]");
eregi("<img alt=\"$_GET[name]\" src=\"/habbo-imaging/avatar/(.*).gif\" />", $page, $result);
$name = $_GET[name];
$url = "http://www.habbo.co.uk/habbo-imaging/avatar/$result[1].gif";
echo("<img src=\"$url\">");
?>
All you needed to do was to change the echo so it outputs the image instead of the url =/
Halting
17-11-2006, 09:28 PM
<?PHP
$page = file_get_contents("http://www.habbo.co.uk/home/$_GET[name]");
eregi("<img alt=\"$_GET[name]\" src=\"/habbo-imaging/avatar/(.*).gif\" />", $page, $result);
$name = $_GET[name];
$url = "http://www.habbo.co.uk/habbo-imaging/avatar/$result[1].gif";
echo("<img src=\"$url\">");
?>Replace what you've got inside habbo.php so far with the code above.
There is. I mentioned that earlier in this thread :).
EDIT: You can remove the variable $name if you like. It has no use whatsoever.
YouFail
17-11-2006, 09:29 PM
Ah crud. Never saw it. Sorry.
Halting
17-11-2006, 09:35 PM
I just came up with another idea.
Using the $url variable, you could easily find out whether a Habbo is banned or not.
For instance, this might be a good feature for a profile:
<?PHP
$page = file_get_contents("http://www.habbo.co.uk/home/$_GET[name]");
eregi("<img alt=\"$_GET[name]\" src=\"/habbo-imaging/avatar/(.*).gif\" />", $page, $result);
$url = "http://www.habbo.co.uk/habbo-imaging/avatar/$result[1].gif";
if ($url != '') { // if the $url variable is empty, then the image couldn't be found. Meaning that Habbo Hotel is under maintenance or they have been banned from using Habbo Hotel.
echo('Normal profile contents go here.');
} else {
echo('This Habbo has been banned.');
}
?>
Just an idea ;)
Kymux
17-11-2006, 09:39 PM
Can anybody find a form for that?
Type name, change url to the Habbo name..
Flumples
17-11-2006, 09:39 PM
I don't think so, because I'm just transfering the ID of the image from the Habbo Home to my website. Unless the image on their Habbo Home changes, I don't think it's possible :( Sorry Sam!
Theres the pic at the the top of the homepage once you're logged in if that helps?
http://www.habbo.co.uk/habbo-imaging/avatar/850011801025508280153000501333056fdd89d4d0802811e6 162d3a4ccb751.gif
http://www.habbo.co.uk/habbo-imaging/avatar/850011801025508280153000501333056fdd89d4d0802811e6 162d3a4ccb751.gif
YouFail
17-11-2006, 09:40 PM
If nobody does it lost i'll write it tommorow. it's a simple get function.
Kymux
17-11-2006, 09:44 PM
www.morningsunshine.net/habbo.html :)
I made this yesterday, got someone to help me fix bugs.
<?php
header("Content-type: image/gif");
$habbo = $_GET['name'];
$domain = 'http://www.habbo.co.uk';
$content = file_get_contents($domain . '/home/'.$habbo);
$div_start = explode('<div class="profile-figure">', $content, 2);
$div_end = explode('</div>', $div_start[1], 2);
$img = trim($div_end[0]);
$img = preg_replace('/<img alt=\"(.*?)\" src=\"(.*?)\" \/>/', '$2', $img);
$imag = $domain.$img;
header("Content-type: image/gif");
$im = imagecreatefromgif($imag);
imagegif($im);
imagedestroy($im);
?>
That is just
/page.php?name=Korma
or whatever
or if you're gonna use it as a signature or something:
Remove Line 2
Change the $habbo in line 5 to the habbo name, but make sure theres ''s around it.
Kymux
17-11-2006, 09:48 PM
Nice to see yours works lol ;p
Halting
17-11-2006, 09:49 PM
That's doing the same sort of thing, isn't it? Looks much better than mine though Tom :)
Mine was a bit buggy before, wasnt working sometimes. Think it works now though.
I also created a code for an image to say if your habbo is online or not.
<?php
$habbo = $_GET['name'];
$home = file_get_contents("http://www.habbohotel.co.uk/home/".$habbo);
if (eregi("http://images.habbohotel.co.uk/web/web-2.0.1_b21/images/myhabbo/profile/habbo_online_anim.gif", $home)){
$img = "http://images.habbohotel.co.uk/web/web-2.0.1_b21/images/myhabbo/profile/habbo_online.gif";
}else{
$img = "http://images.habbohotel.co.uk/web/web-2.0.1_b21/images/myhabbo/profile/habbo_offline.gif";
}
header("Content-type: image/gif");
$im = imagecreatefromgif($img);
imagegif($im);
imagedestroy($im);
?>
Same /page.php?name=Korma
thing. etc.
Examples in my signature are for the habbo called:
-1.
Halting
17-11-2006, 10:07 PM
Here's another little script which would be ideal for a Habbo profile.
<?PHP
$page = file_get_contents("http://www.habbo.co.uk/home/$_GET[name]");
eregi("<img alt=\"$_GET[name]\" src=\"/habbo-imaging/avatar/(.*).gif\" />", $page, $result);
$url = "http://www.habbo.co.uk/habbo-imaging/avatar/$result[1].gif";
if ($result[1]) {
echo('The username '.$_GET[name].' is not banned from using Habbo Hotel UK.');
} else {
echo('This username '.$_GET[name].' is banned from using Habbo Hotel UK.');
}
?>
Perhaps you could customize it so that if your user is banned then their profile will not be shown, meanwhile, if they are not banned, their profile will display.
http://www.bobblefm.co.uk/banned?name=Callie
http://www.bobblefm.co.uk/banned?name=Halting
Kymux
17-11-2006, 10:14 PM
That's clever. Bit boring, But clever!
Fonejacker
17-11-2006, 10:36 PM
Any Why of putting it as ur sig on here or does it not support PHP and can u make a script that says if the user is online or offline
1. There is a way, you need to save this to a php file
<?php
header("Content-type: image/gif");
$habbo = "NAME HERE";
$domain = 'http://www.habbo.co.uk';
$content = file_get_contents($domain . '/home/'.$habbo);
$div_start = explode('<div class="profile-figure">', $content, 2);
$div_end = explode('</div>', $div_start[1], 2);
$img = trim($div_end[0]);
$img = preg_replace('/<img alt=\"(.*?)\" src=\"(.*?)\" \/>/', '$2', $img);
$imag = $domain.$img;
$im = imagecreatefromgif($imag);
imagegif($im);
imagedestroy($im);
?>
and upload it, change the NAME HERE bit to your habbo name. Then treat it like an image.
2. Check my post in the Coding section.
Halting
17-11-2006, 10:46 PM
I've put several other scripts to find the Habbo Birthdate and Mission. I'm not going to say how they're done, but if you take a look at how I did the Habbo Imagaging one it's rather obvious.
Take a look, go to www.bobblefm.co.uk and have a look at someones profile.
Nick.
17-11-2006, 11:00 PM
I've put several other scripts to find the Habbo Birthdate and Mission. I'm not going to say how they're done, but if you take a look at how I did the Habbo Imagaging one it's rather obvious.
Take a look, go to www.bobblefm.co.uk and have a look at someones profile.
Sexy :)
I think this will come in handy, in a way it's the next generation of staff pages! :p
Stitch
18-11-2006, 06:46 PM
im just getting a red x
Which imager are you using Stitch?
Stitch
18-11-2006, 07:49 PM
Which imager are you using Stitch?
I'm using this code:
<?php
$habbo = $_GET['name'];
$home = file_get_contents("http://www.habbohotel.co.uk/home/".$habbo);
if (eregi("http://images.habbohotel.co.uk/web/web-2.0.1_b21/images/myhabbo/profile/habbo_online_anim.gif", $home)){
$img = "http://images.habbohotel.co.uk/web/web-2.0.1_b21/images/myhabbo/profile/habbo_online.gif";
}else{
$img = "http://images.habbohotel.co.uk/web/web-2.0.1_b21/images/myhabbo/profile/habbo_offline.gif";
}
header("Content-type: image/gif");
$im = imagecreatefromgif($img);
imagegif($im);
imagedestroy($im);
?>
and named it habbo.php
Are you going to use it for a signature or something else?
Stitch
18-11-2006, 08:13 PM
something else
1. Are you using a PHP Enabled Host
2. Are you putting: habbo.php?name=RFC-Dude
or whatever?
Stitch
18-11-2006, 08:38 PM
1. yeah
2. yeah
Hmm, Im using the same code and it works fine
http://tom.ijeax.com/habbo.php?name=RFC-Dude
Microsoft
19-11-2006, 03:56 PM
Nice script Oli ;]
+rep
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2026 vBulletin Solutions Inc. All rights reserved.