home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / srev13h.zip / CNTFILES.DOC < prev    next >
Text File  |  2001-03-27  |  8KB  |  218 lines

  1. 11 June 1999.      SRE-http counter Files                          
  2.  
  3. Contents:
  4.  
  5. I.      Introduction
  6. I.a     The HITS and COUNTS counter file (COUNTER.CNT)
  7. I.a.i      Examples  
  8. I.a.ii     Notes  
  9. I.b     The RECRDALL.CNT counter file   
  10. I.b.i      Examples  
  11. I.b.ii     Notes  
  12. I.c.    The SENDFILE.CNT sent-files counter file   
  13. I.c.i      Examples  
  14. I.c,ii     Notes
  15.  
  16.                       ______________________________________                     
  17.  
  18.  
  19. I.      Introduction
  20.  
  21. SRE-http has several files use for counting and auditing. This document
  22. describes several of them: COUNTER.CNT. SENDFILE.CNT, and RECRDALL.CNT.
  23. By default, they are installed to the DATA\ subdirectory of your
  24. GoServe working directory (say, x:\goserve\data).
  25. Note that these 3 files have some user configurable options.
  26.  
  27. In addition to these files:
  28.   * SRE-http can maintain a set of "common log files". See SREFLOGS.DOC for
  29.     the details.
  30.   * SRE-http supports  COUNTER, a highly flexible, graphics-capable hit counter
  31.     facility. See COUNTER.DOC for the details.
  32.   * SRE-http is shipped with two cgi-bin scripts that provide hit counter 
  33.     capabilities: XCOUNT.CMD and JCOUNT.CMD. See CNTDEMO1.SHT for a demo.
  34.   * GoServe maintains an audit file (GOAUDIT.80). For details on its use, see
  35.     GOSERVE.DOC (GOSERVE.DOC comes with GOSERVE, it is NOT part of SRE-http).
  36.  
  37.                       ______________________________________                     
  38.  
  39.  
  40. I.a The HITS and COUNTS counter file (COUNTER.CNT)
  41.  
  42. The counter file is used to record the number of requests (also known as the 
  43. number of hits) for this document. It is used whenever a REPLACE HITS or a 
  44. REPLACE COUNTS keyphrase is processed. 
  45.  
  46. The counter file has syntax:
  47. HOST_NICKNAME//AURL CTS MESSAGE_1 , MESSAGE_2
  48.  
  49.   #  HOST_NICKNAME is optional.
  50.  
  51.   #  AURL is a ⌠selector⌡ corresponding to an HTML document
  52.  
  53.   #  CTS is the current count of the number of requests.
  54.  
  55.   #  MESSAGE1 and MESSAGE2 are used by HITS to display the # of requests.
  56.  
  57. When a REPLACE HITS keyphrase is encountered, SRE-http looks in the counter file 
  58. for an AURL that matches the REQUEST ⌠SELECTOR⌡ If it finds a match, the CTS, 
  59. MESSAGE_1 and MESSAGE_2 values are extracted. CTS is then augmented by one and 
  60. written back to counter file. 
  61.  
  62. Lastly, a "count of hits" string is included in the the requested document. This 
  63. string will have the form: 
  64. MESSAGE_1 CTS1 MESSAGE_2
  65. ⌠a generic message_1 is used if message_1 and message_2 are missing⌡
  66.  
  67. For REPLACE COUNTS, the same procedure is followed, except MESSAGE_1 and 
  68. MESSAGE_2 are ignored. 
  69.  
  70.     If the request ⌠selector⌡ does not match any of the AURL's, a new entry 
  71.     will be created (with CTS=1 and MESSAGE_1 and MESSAGE_2 left blank). 
  72.  
  73.  
  74. I.a.i)  Examples  
  75.  
  76.   
  77. INDEX.HTM  66 You are visitor # , since <!--replace creation_date  -- GT}
  78. PROJECTS/PROJ1.HTM  19
  79. CALC/CALC.HTM  9
  80. OVERVIEW.HTM  13
  81. BRIDGES//VERMONT/COVERED.HTM  15
  82.  
  83. Note the use of the message_1 and message_2 blocks in the entry for INDEX.HTM. 
  84. Also note the use of a REPLACE keyphrase in the message_2 block. 
  85.  
  86. I.a.ii)  Notes  
  87.  
  88.    @ Only the portion of the request ⌠selector⌡ before a ? is used.
  89.  
  90.    @ The default name of the counter file is COUNTER.CNT. You can modify this by 
  91.      changing the COUNTER_FILE. 
  92.  
  93.    @ Wildcard matching is NOT attempted.
  94.  
  95.    @ An alternative means of recording "number of requests" is provided by 
  96.      setting the «[2]RECORD_OPTION» variable. 
  97.  
  98.    @ Another alternative is the «[3]SENDFILE» facility, which keeps track of 
  99.      explicitily requested files. 
  100.  
  101.    @ Or, you can use COUNTER.RXX -- invoked using an INTERPRET keyphrase (see 
  102.      «[4]COUNTER.DOC» for details). 
  103.  
  104.    @ Yet another alternative is to use external programs to generate a "counter 
  105.      GIF". Many of these programs will also keep track of the number of hits. 
  106.      For example, XCOUNT.CMD (a CGI-BIN script) will generate a simple 
  107.      "odometer" style counter, and also keep track of the number of hits (note 
  108.      that this doesn't work if the client has her browser set to not load 
  109.      graphics). 
  110.  
  111.    @ In the COUNTER_FILE (and in the ACCESS_FILE, the SENDFILE_FILE, and the 
  112.      RECORD_ALL_FILE) ... 
  113.  
  114.       #  The REQUEST ⌠SELECTOR⌡ is used to record entries -- before ALIAS and 
  115.          other replacements. 
  116.  
  117.       #  / characters are converted to \ characters; and leading \ (or /) 
  118.          characters are dropped. 
  119.  
  120.       #  lines beginning with a ; are comments.
  121.  
  122.       #  The "host nickname", if present, is appended to the beginning of the 
  123.          ⌠selector⌡ . For example, the BRIDGES//VERMONT/COVERED.HTM example 
  124.          signifies a ⌠selector⌡ of VERMONT/COVERED.HTM to a host with a host 
  125.          nickname of BRIDGES. 
  126.  
  127.                      ______________________________________                     
  128.  
  129. I.b) The RECRDALL.CNT counter file   
  130.  
  131. The RECORD_ALL_FILE (with default name RECRDALL.CNT) is used to record all 
  132. actions, such as transfers of files and requests for server side processing. It 
  133. is used when «[5]RECORD_OPTION» is enabled. 
  134.  
  135. The structure of the RECORD_ALL_FILE is similar to the COUNTER_FILE, with a few 
  136. exceptions: 
  137.  
  138.   #  All requests are tracked (including requests for HTML documents, requests 
  139.      for .GIF files, and Server Side Processing requests). 
  140.  
  141.   #  Instead of a MESSAGE_1 , MESSAGE_2 following the AURL CTS , the date of the 
  142.      last successful request for this ⌠selector⌡ written. 
  143.  
  144.   #  RECORD_ALL_FILE may contain "wildcard matches" -- typically subdirectory 
  145.      entries. 
  146.  
  147. II.b)  Example  
  148.  
  149.   
  150. PROJECT/PROJ1.HTM  9 03/01/96
  151. TEMP/ZFVL5615.LST  1 02/28/96
  152. DOSEARCH  4  2/29/96
  153. OVERVIEW.HTM 7 03/01/96
  154. TEMP/*  3 03/01/96
  155. ZOO// SCHEDULE.HTM 120 05/03/96
  156.  
  157. Note the TEMP/* entry is used as an wildcard match; if RECORD_OPTION="YES" or 
  158. "YES_ALL", then all requests for files in the "temporary directory" will be 
  159. recorded in the TEMP/* entry (the assumption is that one is typically not 
  160. interested in specific information on temporary files). Also note 
  161. TEMP/ZFVL5615.LST -- it was written when a file in the "temporary" directory was 
  162. requested, and before the TEMP/* entry was added to the RECORD_ALL_FILE (the 
  163. server administator must have added the TEMP/* entry on 2/29/96!). 
  164.  
  165. Also, note that the date is the date of the most recent "allowed" request.
  166.  
  167. I.b.ii)  Notes  
  168.  
  169.    @ The RECORD_ALL_FILE is meant strictly for recording information -- it does 
  170.      not contain message strings, nor does it contain "access control" 
  171.      information. 
  172.  
  173.    @ Entries in the RECORD_ALL_FILE may be host specific
  174.  
  175.    @ If more then one "wildcard" entry matches the requested ⌠selector⌡ , the 
  176.      "best match" is used. 
  177.  
  178.                      ______________________________________                     
  179.  
  180.  
  181. I.c. The SENDFILE.CNT sent-files counter file   
  182.  
  183. The SENDFILE_FILE counter file (with default name SENDFILE.CNT) is used by the 
  184. SENDFILE facility to record transferals. 
  185.  
  186. Each entry should have the form: 
  187. ; host_nickname//URL_NAME  CTS   LAST_SENT
  188. where:
  189.   host_nickname// does not appear in single host setups
  190.   URL_NAME can include wildcards.
  191.      and there is NO space between host_Nickname// and URL_NAME.
  192.    The URL_NAME is relative to the data directory, or a virtual directory.
  193.    CTS is the "count of hits"
  194.    LAST_SENT is the date of the most recent request for this file
  195.  
  196.  
  197. I.c.i) Examples  
  198.  
  199.   
  200. CTEMP/FOO.HTM  4 07/06/96
  201. GOS/GO1.HTM  6 07/06/96
  202. EAA.HTM  20 07/06/96
  203. /SAMPLES/SRCHINDX.DOC  2 07/07/96
  204. /SAMPLES/TESTTABL.HTM  1   07/06/96
  205. ZOO//  TIGERS.DOC 5  06/07/96
  206.  
  207. I.c,ii) Notes:
  208.  
  209.    @ If a SENDFILE_FILE does not exist, it will be created.
  210.  
  211.    @ Entries in the SENDFILE_FILE may be host specific.
  212.  
  213.    @ If more then one "wildcard" entry matches the request ⌠selector⌡ , the 
  214.      "best match" is used. 
  215.  
  216.  
  217.  
  218.