Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Count how many times a CGI script has been called

by little (Curate)
on May 04, 2003 at 11:03 UTC ( #255461=note: print w/replies, xml ) Need Help??

in reply to Count how many times a CGI script has been called


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: - - [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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://255461]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2018-06-21 22:21 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (120 votes). Check out past polls.