Server status check in web page

C

CiRcUiT

I have been trying to figure out how to have a graphic on my
main site to show my home server status for the people who
use my voice and other server applications that I run on it.

I tried making an image of an "online" graphic with a
background of an "offline" graphic and putting the "online"
graphic on my home html server and it sort of works but if
the server is offline the graphic is shown as broken. The
broken icon blocks the "offline" graphic so...

Is there some easier way to do this kind of thing?

I use Macromedia Dreamweaver MX and Fireworks MX with some
minor hand coding.

Thanks for your help!
--
ttyl,

CiRcUiT -=- J. Codling -=- www.jcodling.com

*This message represents the official opinions of the voices
in my head*
 
E

Ethan Schlenker

I have been trying to figure out how to have a graphic on my
main site to show my home server status for the people who
use my voice and other server applications that I run on it.

I tried making an image of an "online" graphic with a
background of an "offline" graphic and putting the "online"
graphic on my home html server and it sort of works but if
the server is offline the graphic is shown as broken. The
broken icon blocks the "offline" graphic so...

Is there some easier way to do this kind of thing?

Take your current solution one step further, and put both images in the
background of divs. Place the online div over the offline div. then if the
online image isn't available, the offline image will show through (assuming
a 50 by 50 image):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Untitled</title>
<style type="text/css" media="screen">
#online
{
background-image: url(http://www.your-server.com/online.jpg);
height: 50px;
width: 50px;
}

#offline
{
background-image: url(offline.jpg);
height: 50px;
width: 50px;
}


</style>
</head>
<body>

<div id="offline"><div id="online"></div></div>

</body>
</html>


Only tested in one browser, but it seems to work just fine.

Ethan
 
C

CiRcUiT

Thank you very much Ethan. I cut and pasted the relevant
parts in the appropriate places and changed the files and
sizes. It works perfectly!

It looks like I should look into cascading style sheets.
They seem to be so useful. (Not to mention that this is the
way of the future...)

CiRcUiT -=- J. Codling -=- www.jcodling.com

*This message represents the official opinions of the voices
in my head*

[..snip..]
 
D

Dennis M. Marks

I have read the following message from "CiRcUiT"
<jcodlingATjcodlingDOTcom>
and have decided to lend my vast knowledge.

The writer said:
I have been trying to figure out how to have a graphic on my
main site to show my home server status for the people who
use my voice and other server applications that I run on it.

I tried making an image of an "online" graphic with a
background of an "offline" graphic and putting the "online"
graphic on my home html server and it sort of works but if
the server is offline the graphic is shown as broken. The
broken icon blocks the "offline" graphic so...

Is there some easier way to do this kind of thing?

I use Macromedia Dreamweaver MX and Fireworks MX with some
minor hand coding.

Thanks for your help!
--
ttyl,

CiRcUiT -=- J. Codling -=- www.jcodling.com

*This message represents the official opinions of the voices
in my head*

and my reply is:
Try playing around with the "onLoad=do-something" event in the img tag.
It seems to work in some browsers. If the image never loads the onLoad
event doesn't take place and no image is displayed.
 
Joined
Sep 26, 2009
Messages
1
Reaction score
0
Server status on webpage

I found a nice php script here:

bluman.wordpress.com/2009/09/25/server-status/

It can be used to display the status from a list of servers. The layout can be easily customized and you can choose the port that should be scanned.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top