www.webdeveloper.com
Results 1 to 8 of 8

Thread: Text file -> awwsome webpage

  1. #1
    Join Date
    Mar 2010
    Posts
    4

    Talking Text file -> awwsome webpage

    Hi all!

    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:

    Code:
    HOSTNAME-LNX-UP,HOSTNAME-WIN-DOWN,HOSTNAME-WIN-UP
    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.

    What do you think, what would be the best for me to start of with? I know a bit HTML and way back when I did some javascripting but that is kind of foggy today

    Thanks in advance all, I'm grateful for all help I can get!

    br,

    Rave

  2. #2
    Join Date
    Nov 2006
    Location
    Springfield, MO
    Posts
    1,541
    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.
    Ryan Butler

    Ryan Butler.org

  3. #3
    Join Date
    Mar 2010
    Posts
    4
    Hey Ryan!

    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.

    br,

    Rave

  4. #4
    Join Date
    Mar 2010
    Posts
    128
    You should be able to do this with javascript as well. Using an ajax call to pull up the server list, and then a javascript function to parse the information correctly.

  5. #5
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    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

  6. #6
    Join Date
    Mar 2010
    Posts
    4
    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!

    /R

  7. #7
    Join Date
    Mar 2010
    Posts
    4
    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)

  8. #8
    Join Date
    Mar 2010
    Posts
    128
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles