Log in

View Full Version : Habbo Status Script



-1.
17-11-2006, 10:05 PM
This is a script I created yesterday to make an image and say if a habbo is on-line or not.. I posted it in a thread earlier but I've decided to make a separate one.



<?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);
?>

If you were saving it as 'status.php' you would type:

http://blah.com/status.php?name=Korma

etc.

If you want it set to a habbo you would:

Change the 2nd line from

$habbo = $_GET['name'];

to

$habbo = "Korma";

Thanks.

Example in my signature set to the habbo " -1. "

Flumples
17-11-2006, 10:12 PM
Awesome +rep :)

-1.
17-11-2006, 10:19 PM
Thanks

Oops forgot to put the example in my signature.

tekni
17-11-2006, 10:22 PM
you can put php in a signature..?

Jackbee
17-11-2006, 10:26 PM
great, +rep

-1.
17-11-2006, 10:26 PM
Yes, you can use GD Images. But it needs to be uploaded somewhere, you can't just paste PHP in.

Jackbee
17-11-2006, 10:30 PM
is it supposed to come with a the habbo aswell?

-1.
17-11-2006, 10:31 PM
No, that is a different script that I posted in another thread.

Ryan.
17-11-2006, 11:03 PM
Great script :p..

How do people find out these things lol...

+rep..

Zaub
18-11-2006, 03:58 AM
seems to be blank for me?

DJCoopster
18-11-2006, 05:07 AM
Wonderful script. Wd <3

RYANNNNN
18-11-2006, 08:16 AM
If you mod_rewrite the url of the script you can use it in signatures.

Jamie.
18-11-2006, 08:53 AM
If you mod_rewrite the url of the script you can use it in signatures.

you can use it in sigs anyway,

in the image tags:

www.yoursite.com/habbo.php?name=yourhabbonamehere

simple :D

RYANNNNN
18-11-2006, 09:31 AM
you can use it in sigs anyway,

in the image tags:

www.yoursite.com/habbo.php?name=yourhabbonamehere (http://www.yoursite.com/habbo.php?name=yourhabbonamehere)

simple :D

you can't have dynamic images in signatures.

-1.
18-11-2006, 09:39 AM
You can have Dynamic Images, as my signature does. But not how Jamie. says. If you really want it in your signature, you could try mod_rewrite or:

Change the 2nd line from

$habbo = $_GET['name'];

to

$habbo = "HABBO NAME";

and then just use

http://bla.com/page.php as your image.

Yeum
18-11-2006, 09:43 AM
Thanks , I am gonna try it in signature in min :)

Samster
18-11-2006, 09:58 AM
That's really good, +rep

-1.
18-11-2006, 10:05 AM
Heres an example of Ryan's idea of using mod_rewrite.

http://tom.ijeax.com/habbo/status/Korma.php

the Korma part can be changed to any habbo name.

Nether$
18-11-2006, 03:43 PM
seems to be blank for me?

make sure you are doing this right:

*Cant view php clientside
*need a php host
*dont just paste onto html if you are using front page (its ok in dreamweaver) make a page and paste the code, call it name.php then where you want the habbos online type: <iframe scr=name.php></iframe> change the height and width e.t.c and then upload it to a php enabled server and it should work

Belacme
18-11-2006, 03:47 PM
Could you do a small tutorial on mod_rewrite. I know it has to do with htaccess and I can never figure out how to use it

-1.
18-11-2006, 04:03 PM
I will write what to do to have it like what I do.

First, make sure your host has mod_rewrite module enabled.

Then in the .htaccess put:


RewriteEngine on
RewriteRule ^habbo/status/([^\/]+).php?$ status.php?name=$1 [L]

The green bit is the name of the php file
The red bits can be changed. As it is you would put

http://yoursite.com/habbo/status/HabboName.php

The HabboName part can be changed to any habbo name.

But if you were to change those to:

RewriteEngine on
RewriteRule ^mystatus/([^\/]+).htm?$ status.php?name=$1 [L]

You would put

http://yoursite.com/mystatus/HabboName.htm

If you dont understand, PM me.

Belacme
18-11-2006, 04:08 PM
My server has frontpage and everytime i upload the htaccess it *****s up

EDIT: ok what If i have the status and the imager.. can I have:

RewriteEngine on
RewriteRule ^imager/([^\/]+).php?$ imager.php?name=$1 [L]
RewriteRule ^status/([^\/]+).php?$ status.php?name=$1 [L]

?

-1.
18-11-2006, 04:38 PM
Yes, that is what I have.

Belacme
18-11-2006, 04:40 PM
I just fixed it :)



RewriteEngine on
RewriteRule ^status/([^\/]+).php?$ status.php?name=$1 [L]
RewriteRule ^figure/([^\/]+)/?$ imager.php?name=$1 [L]
RewriteRule ^figure/([^\/]+)?$ imager.php?name=$1 [L]
RewriteRule ^status/([^\/]+)/?$ status.php?name=$1 [L]
RewriteRule ^status/([^\/]+)?$ status.php?name=$1 [L]

wilky15
31-12-2006, 09:53 PM
this doesnt work for me, it just shows offline the whole time.

Verrou
02-01-2007, 01:34 AM
how do i know if my mod_rewrite module thing is on?

Verrou
03-01-2007, 06:05 AM
Soz for double post o_o
Tom can youn send me another copy of the Signature Status Bundle please?
Send me the link in Pm, i muffed mine up trying to get it to work :P

Call
03-01-2007, 08:20 PM
Mine shows offline off all the time as well.

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