Instructables

How can i make a status light for my website?

I host my own website on a old crappy computer (pc running xp) and i want to make a light that will be green when the website is up and red when the website is down this way i will easily be able to tell when the website is down because this computer is making weird noises (i think its the hardrive) so i was thinking that maybe i could make a c++ program to go to the site and see if it can get something from the server and if it can it would turn a pin the the lpt or serial port high if it cant it would turn a diffrent pin high wich would be connected to a red led. does anyone know of a better easier idea. or does anyone know how i can even do this i am a begginer with c++. ps i know this project is semi pointless but i like to do stuff with computer and stuff

gmxx5 years ago
it would be easy to do... im thinking an if else loop using a ping to the server. you would then pull a serial pin high to light a led/relay. or if you use the arduino, you coule put the text file on a server containg one word. With a serial program over usb on the board, you could have it try to read the file from the server address (NOT the local one) using an if else... so: read file: (assume online means server is working) If online, execute code. If else, execute other code.
Tanners (author)  gmxx5 years ago
but how do i make the serial pin high?
gmxx Tanners5 years ago
lemonie5 years ago
You could just create a web-page that uses a bit of java script to reload every 5 seconds? Green background & text that say "OK", if it fails you get a standard error message. L
Tanners (author)  lemonie5 years ago
i wanted just be a little led light in my room or something
Here is how one person did exactly what you're looking for:

http://hacknmod.com/hack/website-visitor-blinker/

Tanners (author)  siliconghost5 years ago
thats really cool but i dont have an arduino or money....