CGI scripts


Here I would like to launch CGI scripts which are being used in this site.

Access Log Access Counter Features of these scripts
They are small scripts made of scores of codes. I am pleased if they would be helpful for you.

All the scripts are in the public domain. You can use them freely at your own risk. The author bear no responsibility, no liability and no obligation for your use of these scripts. Links to this page and republishing of the scripts are free. I would like to know where this page is linked and they are republished, so please e-mail to me on later if possible. Refer here about the copyright policy in this web-site.



Script to record access and download log and mail them automatically when log file becomes full ... CGI version

Do you want to know how your visitors hit your pages and data? If you think so, this script is what you need.

This CGI takes perfect logs (access and data-download) of your site and e-mail them automatically to you. I had searched in the Internet but could not find any suitable for my purpose, so I made it.

The original script is mail-log.cgi by Mr. Walter Soldierer. I add some codes to work mail-log.cgi without SSI and I changed it to take both access-log and data-download-log. Many thanks to Mr.Soldierer permitting me to launch this CGI in my site.

The log now being recorded is here.

How to use

source Refer to the comments of the script about the set-up.



Script to record access log and mail them automatically on the next day ... SSI version<

I had opened this site with the scripts above. Examining log data, I found that the browser which did not show images did not leave log data.
Only download logs and no page access log. Did this mean a script's bug? But I thought it again and noticed that would be a browsing without an image. Dear Robot!

Thereby, I knew that SSI method was inevitable to take log. So I changed the script to work in SSI mode and to send a mail on the next day.

How to use

source Refer to the comments of the script about the set-up. More detailed comments are in the cgilog.cgi. Setting of a gif file is unnecessary because it works by SSI method.

Arranged versions of these two scripts



CGI access counter

I have an access counter of Arabic digits in my top page. CGI version is for the top page placed on NiftyServe which does not permit CGI. I place this script on the server which permits CGI and call the script by HREF-URL tag.
I made it from access log scripts above. Very simple. Only 20 lines but it works well.

Click here. You can see 13 figures Arabic counter.

How to use

source The vital point of this script is the use of ARGV[1] to show count-up timing explicitly from MTML source. You can only change HTML source to reverse a numeric order. It's a desperate way taken under the pressure of necessity to use Arabic digits.



SSI mode access counter

You should confirm your server allows SSI. If not, you must abandon to use this script. Use CGI script.

CGI script has problems below (practically they doesn't matter so much. You can confirm this by the sample CGI and SSI). There are a few measures to avoid this problems. But they make a script large and complicated.
For this reason. I decide English top page of this site uses SSI method.
SSI method makes the script simpler but its speed is only a feeling.(^^;;;Here is a sample of 13 columns SSI counter. Compare it with CGI sample.

How to use

source This script is easily arranged to reverse numeric order. If you are interested in, please click here.



All codes of this script is arranged by me. Therefore I am responsible to the questions about these scripts. Do not ask Mr.Soldierer directly.

Home