Saturday, March 24, 2012

Newbie help Webpage that pings servers and returns if it is up.

I want to create a web page that will ping a server an return a if the machine is up.
If it is up i want it to change an image to another image to tell me the server is down.
Can anyone help?You could use something like:
try {

WebRequest test = WebRequest.Create("http://www.domain.com");

//display "up" image

} catch ( Exception e ) {

//display "down" image
}

For more information on System.Net.WebRequest use the link below (.NET Class Library) and in the left frame go to System.Net -> WebRequest.
Hey thanx for the replay but im new to this stuff is there anyway you could give me a little more info?

0 comments:

Post a Comment