Text file -> awwsome webpage
I work at a small company that hosts minor servers (standalone random servers). I made a visual basic application that pings the machines and saves the results in a list. And then do the same over and over again. And the output is something like this:
I would like to create a web page that read from that text file and based on that set a green or a red dot (gif), type out the host name, show a small pic based on host platform (linux, windows).
Today I have nothing so I turn to you guys here to maby get me started.
Minimum i had in mind were to just list em all as described above, best case would be to be able to sort them (after name, platform) and perhaps search as well.
Thanks in advance all, I'm grateful for all help I can get!
You could do it with PHP or ASP.NET. You just need a way to hook into decision making, such as displaying icons, etc. Depending on how large the text file gets, you might want to dump that to a database and go that route.
First, thanks for answering m8!
The total amount of entrys in the txt file will never grow over 300-400 so its really not that big.
If you're already doing this in VB then keep on going down that road. Just build the XHTML as you go using MSXML and the DOM.
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
rproctor83: Im really just looking for the most easy way to do this, i never worked with ajax so im not really familiar with what it can do. Ill have a look at it.
Charles: I should probably tell u that im working with vb 6.0
Thanks for answering guys!
So i been looking in to it deeper now with info that you guys provided. I think i will get away smoothest with a php web page on the servers. I found som info here on the forum regarding how to make it read from a text file so thats ok for now... To the 500$ question though.. how make php look for "-UP" or "-DOWN" in the text and replace it with a gif :S (this probably belongs in the php section, i know)
If you have php already setup on the servers, then yes you should just go with a php script to do this. You can use a few different commands:
preg_replace() : http://us2.php.net/manual/en/function.preg-replace.php
str_replace() : http://us2.php.net/manual/en/function.str-replace.php
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)