-
Signature controller
What I have wrote in this thread may not be correct, and the script might not be very secure. If you use it, your using it at your own risk - and I can't take any responsibility for it.
Ok I've decided to make a thread explaining how you can create a PHP page which controls the image in your signature.
For an example I'm going to make a PHP page which changes the image from "I am on Habbo" to "I am not on Habbo", when you type offline or online into a small page- You could use this to tell people that you are on / not on Habbo without having to use your User CP.
Create a .php page containing this code:
PHP Code:
<?php
//Says that PHP page is a GIF image
header("Content-type: image/gif");
//Gives $status the value of status.txt
$file = "status.txt";
$open = fopen($file, 'r');
$status = fread($open, filesize($file));
fclose($open);
//If $status is set to online, the image online.gif is shown
if
($status == "online")
include 'online.gif';
//If it says somthing other than online, offline.gif is shown
else
include 'offline.gif';
?>
The page which you state if you are online or offline in, save it as .php
(You might want to password protect it).
PHP Code:
<!-- A form to say if you're offline or online in -->
<form method='post'>Are you offline or online?<br />
<input type='text' maxlength='30' name='about' ><br />
<input type='submit' value='Go!'>
</form>
<?php
//If offline is entered, it changes status.txt to offline
if
($about == "offline")
{$open = fopen("status.txt", "w");
fwrite($open, $about);
fclose($open);
}
//If online is entered, it changes status.txt to online
if
($about == "online")
{$open = fopen("status.txt", "w");
fwrite($open, $about);
fclose($open);
}
?>
You'll now need to create a text file called "status.txt" and chmod it to 777.
Example:
http://joshh.co.uk/status.php
Control page:
http://joshh.co.uk/statusadmin.php
If any one has spotted any mistakes, pm me :p
-
very interesting :)
You could also put sql into this to password protect it :)
-
I dont get it xD Whats it supposed to do? Change the image in your sig? I dont see how it works, Call me dumb if you want
-
Yes :P, with an admin cp i tink
-
-
Pfffft to be honest im no good at webdesign yet im a habboxlive webdesigner ''/ I resigned anyway, im now a graphics designer xD
-
I got rejected as a HabboxLive webdesigner :p
- Dan
-
I resigned n reccomended sygon :)
-
Cool, i probably would forget to do something as i'm always soo busy :)
- Dan
-
-
I swear tonights been boring, i got the Flu and i feel like absolute s**t
- Dan
-
Habbox live web designer? I'll do that. Where do I apply?