-
[REL] Working HTML & PHP Server Status Code
Hey, I decided to make this server status thing :) And it works with PHP and HTML ^-^
HTML Code (can only use default images):
Code:
<img src="http://www.habblissinc.com/junkyhotel/status.php?link=YOURIPHERE:YOURPORTHERE">
PHP Code (can use your own images):
Code:
<?php
//you can change these so they link to any image you want :)
$live = "YOURONLINEIMAGE";
$dead = "YOUROFFLINEIMAGE";
list($addr,$port)= explode (':',"$link");
if (empty($port)){
$port = 90;//can change port to whatever
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
if (!$churl){
header("Location: $dead");
}
else {
header("Location: $live");
}
function server($addr){
if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
return $addr;
}
?>
Then put
Code:
<img src="http://www.yourdomain.com/status.php?link=YOURIPHERE&port=YOURPORTHERE">
On your site
Here is how to work the PHP one:
1. Make a file called green.gif and change
'$live = "YOURONLINEIMAGE";' to '$live = "http://yourdomain.com/green.gif";'
2. Make a file called red.gif and change
'$live = "YOURONLINEIMAGE";' to
'$dead = "http://yourdomain.com/red.gif";'
3. Upload
4. Make a PHP File with a name like "status.php"
5. Put the PHP Code into the PHP file
6. Open the http://yourdomain.com/status.php
7. Enter your IP where it says "YOURIPHERE
8. Upload
9. Put the:
<img src="http://www.yourdomain.com/status.php?link=YOURIPHERE&port=YOURPORTHERE">
onto a page where you want the server status to appear
(like on your homepage or loader page)
10. Start your server
11. See if it works
Here is how to work the PHP one:
1. Open site you want to put it on
2. Paste the code where it is going to appear for others
3. Add it so it says <img src="http://habblissinc.com/junkyhotel/status.php?link=YOURIPHERE:YOURPORTHERE"> in the Source
4. Start your server
5. See if it works
Example:
Code:
<?php
//you can change these so they link to any image you want :)
$live = "http://habblissinc.com/junkyhotel/green.gif";
$dead = "http://habblissinc.com/junkyhotel/red.gif";
list($addr,$port)= explode (':',"$link");
if (empty($port)){
$port = 90;//can change port to whatever
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
if (!$churl){
header("Location: $dead");
}
else {
header("Location: $live");
}
function server($addr){
if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
return $addr;
}
?>
goes onto a page called 'serverstatus.php' then on the page you want to display the server status have
Code:
<img src="http://www.habblissinc.com/junkyhotel/status.php?link=YOURIPHERE:YOURPORTHERE">
-
Re: [REL] Working HTML & PHP Server Status Code
Good Star for a Newbie! Welcome to RaGEZONE but you alread have 4 post :)))
Regards
saddiqiqbal :biggrinth:furious:
-
Re: [REL] Working HTML & PHP Server Status Code
-
Re: [REL] Working HTML & PHP Server Status Code
Quote:
Hey, I decided to make this server status thing :)
you fucking didn't made this,
this whas released by the guy of habbo-cms.com
-
Re: [REL] Working HTML & PHP Server Status Code
Thanks but why does it always say Offline :s
-
Re: [REL] Working HTML & PHP Server Status Code
Very nice for a first class newbie :D
Greetzz, Fab
-
Re: [REL] Working HTML & PHP Server Status Code
-
Re: [REL] Working HTML & PHP Server Status Code
Congratulations!!!
Great Tutorial...
You've won yourself a delicous cookie!
Regards
- Mark
-
Re: [REL] Working HTML & PHP Server Status Code
-
Re: [REL] Working HTML & PHP Server Status Code
-
Re: [REL] Working HTML & PHP Server Status Code
-
Re: [REL] Working HTML & PHP Server Status Code
-
Re: [REL] Working HTML & PHP Server Status Code
I Get
[code]
Warning: Cannot modify header information - headers already sent by (output started at /home/habplus/public_html/advertise/status.php:1) in /home/habplus/public_html/advertise/status.php on line 23
-
Re: [REL] Working HTML & PHP Server Status Code
If the php one isn't working for u just use
<img src="http://www.habblissinc.com/junkyhotel/status.php?link=YOURIPHERE&port=YOURPORTHERE">
Where you want the server status to appear
-
Re: [REL] Working HTML & PHP Server Status Code
Don't work, it says evertime offline but the Hotel is online :S
http://www.habblissinc.com/junkyhote....org&port=1232
-
Re: [REL] Working HTML & PHP Server Status Code
-
Re: [REL] Working HTML & PHP Server Status Code
:S Wierd, not working for me + I put everything in the right section. Maybe fake.+ Juhnke stop spamming thread saying "eats cookie" PMSL.
-
Re: [REL] Working HTML & PHP Server Status Code
Screens that is working please
-
Re: [REL] Working HTML & PHP Server Status Code
It does not make sence!
1. Make a file called green.gif and change
'$live = "YOURONLINEIMAGE";' to '$live = "http://yourdomain.com/green.gif";'
Dose that mean change that and leave the rest of the code?
Quote:
<?php
//you can change these so they link to any image you want :)
$live = "YOURONLINEIMAGE";
$dead = "YOUROFFLINEIMAGE";
list($addr,$port)= explode (':',"$link");
if (empty($port)){
$port = 90;//can change port to whatever
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
if (!$churl){
header("Location: $dead");
}
else {
header("Location: $live");
}
function server($addr){
if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
return $addr;
}
?>
-
Re: [REL] Working HTML & PHP Server Status Code
example:
Code:
<?php
//you can change these so they link to any image you want :)
$live = "http://habblissinc.com/junkyhotel/green.gif";
$dead = "http://habblissinc.com/junkyhotel/red.gif";
list($addr,$port)= explode (':',"$link");
if (empty($port)){
$port = 90;//can change port to whatever
}
$churl = @fsockopen(server($addr), $port, $errno, $errstr, 20);
if (!$churl){
header("Location: $dead");
}
else {
header("Location: $live");
}
function server($addr){
if(strstr($addr,"/")){$addr = substr($addr, 0, strpos($addr, "/"));}
return $addr;
}
?>
goes onto a page called 'serverstatus.php' then on the page you want to display the server status have
Code:
<img src="http://www.habblissinc.com/junkyhotel/status.php?link=YOURIPHERE:YOURPORTHERE">
@PixelPro123
I like spamming so, stop me!! >:]
-
Re: [REL] Working HTML & PHP Server Status Code
It don't work by me..
Its every time saying when I go to it..
status.php
Open / Save / Cancel
-
Re: [REL] Working HTML & PHP Server Status Code
i did it al but always say offline and when i do with your link it works :S can you give you source because when i try to ask the status it redirect to the image. ty
-
Re: [REL] Working HTML & PHP Server Status Code
thanks for release it works for me :D:D
-
Re: [REL] Working HTML & PHP Server Status Code
lol... u doesn't make it -,-
I believe that guy of habbo cms made this..
-
Re: [REL] Working HTML & PHP Server Status Code
Very nice! Only one problem, its only best for Ham hotels as the owner will have to keep changing his ip!!!!!!!!!!!!!!!!!
-
Re: [REL] Working HTML & PHP Server Status Code
-
Re: [REL] Working HTML & PHP Server Status Code
Nice release, if you count ripping off a release.
I made a much better one a long time ago here: http://forum.ragezone.com/f385/image...es-rel-301414/
There is a JS version, and an image version, and its transparent, so you can fit it in any background
-
Re: [REL] Working HTML & PHP Server Status Code
huh where to put the ip in the php code?
-
Re: [REL] Working HTML & PHP Server Status Code