nasa,

When your script is called via a "submit" button then your server will get a document request for your script using request method POST. This will look alike:

217.9.44.215 - - [04/May/2003:12:47:35 +0200] "POST /cgi-bin/nasa.cgi HTTP/1.1" 302 5

In this way when determining your web server access logs you would see all SUCCESSFULL calls to that script and in your error scripts then those calls to the script that caused an internal server error, which happens if your script dies or will bot be executed due to an error.

So I would go with Abigail-II to use the server logs for that counting task at its already there, you just need to grab those infos from them.

try to search for "web log anlalyzer" here at perlmonks or at cpan or sourceforge or even google and you'll find plenty of tools who already have been invented and mostly heavily tested, which enable you with small modifications or just custom initial settings to fullfill your task.

I would not recommend appending to a file as that consumes your web servers ressources and is already done in other places by the web server itself.

Have a nice day
All decision is left to your taste


In reply to Re: Count how many times a CGI script has been called by little
in thread Count how many times a CGI script has been called by nasa

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.