home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
srev13h.zip
/
CNTFILES.DOC
< prev
next >
Wrap
Text File
|
2001-03-27
|
8KB
|
218 lines
11 June 1999. SRE-http counter Files
Contents:
I. Introduction
I.a The HITS and COUNTS counter file (COUNTER.CNT)
I.a.i Examples
I.a.ii Notes
I.b The RECRDALL.CNT counter file
I.b.i Examples
I.b.ii Notes
I.c. The SENDFILE.CNT sent-files counter file
I.c.i Examples
I.c,ii Notes
______________________________________
I. Introduction
SRE-http has several files use for counting and auditing. This document
describes several of them: COUNTER.CNT. SENDFILE.CNT, and RECRDALL.CNT.
By default, they are installed to the DATA\ subdirectory of your
GoServe working directory (say, x:\goserve\data).
Note that these 3 files have some user configurable options.
In addition to these files:
* SRE-http can maintain a set of "common log files". See SREFLOGS.DOC for
the details.
* SRE-http supports COUNTER, a highly flexible, graphics-capable hit counter
facility. See COUNTER.DOC for the details.
* SRE-http is shipped with two cgi-bin scripts that provide hit counter
capabilities: XCOUNT.CMD and JCOUNT.CMD. See CNTDEMO1.SHT for a demo.
* GoServe maintains an audit file (GOAUDIT.80). For details on its use, see
GOSERVE.DOC (GOSERVE.DOC comes with GOSERVE, it is NOT part of SRE-http).
______________________________________
I.a The HITS and COUNTS counter file (COUNTER.CNT)
The counter file is used to record the number of requests (also known as the
number of hits) for this document. It is used whenever a REPLACE HITS or a
REPLACE COUNTS keyphrase is processed.
The counter file has syntax:
HOST_NICKNAME//AURL CTS MESSAGE_1 , MESSAGE_2
# HOST_NICKNAME is optional.
# AURL is a ⌠selector⌡ corresponding to an HTML document
# CTS is the current count of the number of requests.
# MESSAGE1 and MESSAGE2 are used by HITS to display the # of requests.
When a REPLACE HITS keyphrase is encountered, SRE-http looks in the counter file
for an AURL that matches the REQUEST ⌠SELECTOR⌡ If it finds a match, the CTS,
MESSAGE_1 and MESSAGE_2 values are extracted. CTS is then augmented by one and
written back to counter file.
Lastly, a "count of hits" string is included in the the requested document. This
string will have the form:
MESSAGE_1 CTS1 MESSAGE_2
⌠a generic message_1 is used if message_1 and message_2 are missing⌡
For REPLACE COUNTS, the same procedure is followed, except MESSAGE_1 and
MESSAGE_2 are ignored.
If the request ⌠selector⌡ does not match any of the AURL's, a new entry
will be created (with CTS=1 and MESSAGE_1 and MESSAGE_2 left blank).
I.a.i) Examples
INDEX.HTM 66 You are visitor # , since <!--replace creation_date -- GT}
PROJECTS/PROJ1.HTM 19
CALC/CALC.HTM 9
OVERVIEW.HTM 13
BRIDGES//VERMONT/COVERED.HTM 15
Note the use of the message_1 and message_2 blocks in the entry for INDEX.HTM.
Also note the use of a REPLACE keyphrase in the message_2 block.
I.a.ii) Notes
@ Only the portion of the request ⌠selector⌡ before a ? is used.
@ The default name of the counter file is COUNTER.CNT. You can modify this by
changing the COUNTER_FILE.
@ Wildcard matching is NOT attempted.
@ An alternative means of recording "number of requests" is provided by
setting the «[2]RECORD_OPTION» variable.
@ Another alternative is the «[3]SENDFILE» facility, which keeps track of
explicitily requested files.
@ Or, you can use COUNTER.RXX -- invoked using an INTERPRET keyphrase (see
«[4]COUNTER.DOC» for details).
@ Yet another alternative is to use external programs to generate a "counter
GIF". Many of these programs will also keep track of the number of hits.
For example, XCOUNT.CMD (a CGI-BIN script) will generate a simple
"odometer" style counter, and also keep track of the number of hits (note
that this doesn't work if the client has her browser set to not load
graphics).
@ In the COUNTER_FILE (and in the ACCESS_FILE, the SENDFILE_FILE, and the
RECORD_ALL_FILE) ...
# The REQUEST ⌠SELECTOR⌡ is used to record entries -- before ALIAS and
other replacements.
# / characters are converted to \ characters; and leading \ (or /)
characters are dropped.
# lines beginning with a ; are comments.
# The "host nickname", if present, is appended to the beginning of the
⌠selector⌡ . For example, the BRIDGES//VERMONT/COVERED.HTM example
signifies a ⌠selector⌡ of VERMONT/COVERED.HTM to a host with a host
nickname of BRIDGES.
______________________________________
I.b) The RECRDALL.CNT counter file
The RECORD_ALL_FILE (with default name RECRDALL.CNT) is used to record all
actions, such as transfers of files and requests for server side processing. It
is used when «[5]RECORD_OPTION» is enabled.
The structure of the RECORD_ALL_FILE is similar to the COUNTER_FILE, with a few
exceptions:
# All requests are tracked (including requests for HTML documents, requests
for .GIF files, and Server Side Processing requests).
# Instead of a MESSAGE_1 , MESSAGE_2 following the AURL CTS , the date of the
last successful request for this ⌠selector⌡ written.
# RECORD_ALL_FILE may contain "wildcard matches" -- typically subdirectory
entries.
II.b) Example
PROJECT/PROJ1.HTM 9 03/01/96
TEMP/ZFVL5615.LST 1 02/28/96
DOSEARCH 4 2/29/96
OVERVIEW.HTM 7 03/01/96
TEMP/* 3 03/01/96
ZOO// SCHEDULE.HTM 120 05/03/96
Note the TEMP/* entry is used as an wildcard match; if RECORD_OPTION="YES" or
"YES_ALL", then all requests for files in the "temporary directory" will be
recorded in the TEMP/* entry (the assumption is that one is typically not
interested in specific information on temporary files). Also note
TEMP/ZFVL5615.LST -- it was written when a file in the "temporary" directory was
requested, and before the TEMP/* entry was added to the RECORD_ALL_FILE (the
server administator must have added the TEMP/* entry on 2/29/96!).
Also, note that the date is the date of the most recent "allowed" request.
I.b.ii) Notes
@ The RECORD_ALL_FILE is meant strictly for recording information -- it does
not contain message strings, nor does it contain "access control"
information.
@ Entries in the RECORD_ALL_FILE may be host specific
@ If more then one "wildcard" entry matches the requested ⌠selector⌡ , the
"best match" is used.
______________________________________
I.c. The SENDFILE.CNT sent-files counter file
The SENDFILE_FILE counter file (with default name SENDFILE.CNT) is used by the
SENDFILE facility to record transferals.
Each entry should have the form:
; host_nickname//URL_NAME CTS LAST_SENT
where:
host_nickname// does not appear in single host setups
URL_NAME can include wildcards.
and there is NO space between host_Nickname// and URL_NAME.
The URL_NAME is relative to the data directory, or a virtual directory.
CTS is the "count of hits"
LAST_SENT is the date of the most recent request for this file
I.c.i) Examples
CTEMP/FOO.HTM 4 07/06/96
GOS/GO1.HTM 6 07/06/96
EAA.HTM 20 07/06/96
/SAMPLES/SRCHINDX.DOC 2 07/07/96
/SAMPLES/TESTTABL.HTM 1 07/06/96
ZOO// TIGERS.DOC 5 06/07/96
I.c,ii) Notes:
@ If a SENDFILE_FILE does not exist, it will be created.
@ Entries in the SENDFILE_FILE may be host specific.
@ If more then one "wildcard" entry matches the request ⌠selector⌡ , the
"best match" is used.