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