- Joined
- Feb 17, 2007
- Messages
- 7
- Reaction score
- 0
Hey, I decided to make this server status thing
And it works with PHP and HTML ^-^
HTML Code (can only use default images):
PHP Code (can use your own images):
Then put
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
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:
goes onto a page called 'serverstatus.php' then on the page you want to display the server status have

HTML Code (can only use default images):
Code:
<img src="http://www.habblissinc.com/junkyhotel/status.php?link=YOURIPHERE:YOURPORTHERE">
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;
}
?>
Code:
<img src="http://www.yourdomain.com/status.php?link=YOURIPHERE&port=YOURPORTHERE">
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
To view the content, you need to sign in or register
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;
}
?>
Code:
<img src="http://www.habblissinc.com/junkyhotel/status.php?link=YOURIPHERE:YOURPORTHERE">
Last edited: