|P is for Practical|
Re: Count how many times a CGI script has been calledby little (Curate)
|on May 04, 2003 at 11:03 UTC||Need Help??|
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:22.214.171.124 - - [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