scene.org File Archive

File download

<root>­/­mirrors­/­flerp­/­.s­/­groups.hun­/­ESP-team­/­linux/counter-cgi.txt

File size:
1 425 bytes (1.39K)
File date:
2013-11-26 23:08:44
Download count:
all-time: 94

Preview

Simple Counter CGI for homepages v2.0        (C) 1997-99 A'rpi/ESP-team
=====================================

Increases a counter and logs counter, host, browser and filename to 
a logfile. Uses lock-file to avoid process overlaps.

Install:
========
Edit configuration (path, filenames) in file "szamol.c",
and after it just execute "./make.sh"

Usage:
======
You have at least 3 ways to run this program:

1. Include-CGI (httpd server must support it and must be enabled)
Insert this line to your HTML file what you want to count/log:
  <!--#exec cmd="/home/arpi/szamol.cgi" -->
It works well with Netscape Fasttrack for IRIX.
For Apache you have to use this and rename your .html file to .shtml:
  <!--#exec cgi="/home/arpi/szamol.cgi"-->
See help of your httpd server for the configuration and command.
Note: of course replace these sample PATHs with yours...

2. Calling from a CGI script:
-------------- main.cgi -------------------------
#!/bin/sh
/home/user/public-html/cgi-bin/szamol.cgi
echo Content-type: text/html
echo
cat /home/user/public-html/main.html
-------------------------------------------------
And you have to specify "main.cgi" in links instead of "main.html"!

3. Calling this CGI directly:
You can specify it as a new frame, so the browser must load/execute it.
I have not tested this method, maybe the browser will report "Document
do not contain data".