Server status check in web page

Discussion in 'HTML' started by CiRcUiT, Feb 4, 2004.

  1. CiRcUiT

    CiRcUiT Guest

    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*
     
    CiRcUiT, Feb 4, 2004
    #1
    1. Advertising

  2. On 2004-02-04 15:15:29 -0800, "CiRcUiT" <jcodlingATjcodlingDOTcom> 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?


    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
    --
    Datarealm Internet Services, Inc.
    Shared Hosting: http://www.serve.com
    Dedicated Hosting: http://www.rackmounted.com
     
    Ethan Schlenker, Feb 5, 2004
    #2
    1. Advertising

  3. CiRcUiT

    CiRcUiT Guest

    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*

    "Ethan Schlenker" <> wrote in message
    news:200402041834388930%ethan@servecom...
    [..snip..]
     
    CiRcUiT, Feb 5, 2004
    #3
  4. 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.

    --
    Dennis M. Marks
    http://www.dcs-chico.com/~denmarks/
    Replace domain.invalid with dcsi.net


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
     
    Dennis M. Marks, Feb 10, 2004
    #4
  5. CiRcUiT

    nico1980

    Joined:
    Sep 26, 2009
    Messages:
    1
    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.
     
    nico1980, Sep 26, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. saha
    Replies:
    0
    Views:
    4,069
  2. Shug
    Replies:
    13
    Views:
    902
    Philipp
    Dec 15, 2006
  3. Shug
    Replies:
    13
    Views:
    956
    Philipp
    Dec 15, 2006
  4. harryos
    Replies:
    0
    Views:
    388
    harryos
    Oct 13, 2010
  5. Pius
    Replies:
    0
    Views:
    381
Loading...

Share This Page