aalneyperl:

I assume that you're just wanting to be able to check to see if your servers are working properly. To do this, something is going to have to run your perl program.

Since you don't sound like you want to set up an web server for this purpose, we'll have to come up with an alternate method. (And who can blame you--*I* certainly have no desire or plan to set up a web server!)

1) If you want the browser to do it, then it's a bit goofy, and I only know how to do it with Internet explorer. It would probably work with firefox If you want to do it that way, I can help a little by sending you a bit of script I wrote for my job. Basically, you stick in some VBScript or Javascript in the web page that can execute your perl program. Then tie the code to a button on your page.

2) Run it as a scheduled job (use Microsoft Scheduler (if you're using Windows) or cron (if you're using a *NIX box)) ever 15 minutes or so, and you'll be able to just load the page in your browser. It'll run more often than you would do it by hand, but I'm assuming that's not a problem. Then you can just refresh the page in your browser any time you're interested in the database status. The primary disadvantage with this method is that the data may be several minutes out-of-date.

3) Another way to do it is to alter your script to generate the HTML page and write it to a file, then tell the browser to start up and load the page. I believe you can start IE up on Windows like so (untested):

exec 'C:\\Program Files\\Internet Explorer\\iexplore.exe', 'C:\\Temp\\StatusReport.html';
I'd advise choosing (2) or (3).

...roboticus


In reply to Re^5: Help with HTML:Template by roboticus
in thread Help with HTML:Template by aalneyperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.