                   Varmint's HTML counter version 1.0

              Written by: Eric Jorgensen (smeagol@rt66.com)
--------------------------------------------------------------------------
INTRODUCTION

  This software package is cgi processor for use with HTML documents.  It 
  allows you to add a decorative counter to any HTML document quickly and 
  easily.  

  This software is offered to the public as FREEWARE.  Please use and enjoy 
  it.  Send any bug reports to: smeagol@rt66.com.

COMPILATION

  This package comes with a SUN executable file, but those on other systems 
  may need to compile the source to obtain a working copy.  You will need:
	
	- GNU C compiler (gcc- available on most UNIX systems)
	- The files counter.c and xbmutil.c

  To compile this package, simply type: 

	gcc counter.c xbmutil.c -o vcounter.xbm

  This will create the executable 'vcounter.xbm'  If you are feeling 
  creative, you may want to change some of the global varaibles in 
  counter.c to more closelay match your system.  You may also want to 
  change the bitmaps for the numbers in xbmutil.c

HOW TO USE THIS COUNTER

  1) Put the executable in your cgi-bin directory.  (if you do not know 
  what a cgi-bin directory is, ask your system administrator.)  Give it 
  world-executable permissions.

  2) Create a sister directory to the cgi-bin called 'logs' and give it
  world-writeable permissions.  (vcounter assumes this directory will be
  there.  If you want to set up a different directory structure, you will
  need to edit counter.c and recompile the software.) To create this
  directory, follow these steps:

	- <Go to the cgi-bin directory>
	- type 'cd ..'
	- type 'mkdir logs'
	- type 'chmod 766 logs'

  3) Create a link in your HTML document.  It will look something like this:

  <IMG SRC="http://www.foo.bar/cgi-bin/joeuser/vcounter.xbm?tagname">

  The tagname is an argument used to specify a unique counter and it can 
  be anything you want as long as it does not have spaces or weird 
  symbols.  This way, you can put a counter on any number of html documents 
  as long as you use a different tagname for each dogument.

FEATURES AND EXTRAS

  A couple items to note:

  - You can generate an inverse bitmap by adding "!i" to the end of 
    the tagname.

  - Notice that you do not have to specify the width of the 
    counter.  It  smart enough to know how wide to make the bitmap.

  - How high can the counter go?  Well, you are safe as long as you
    don't get more than 2 Billion hits to your page.

  - This program uses a lock file technique to prevent problems 
    from happening when more than two counters are accessed simultaneously.
    If the counter should crash for any reason, it will leave behind a 
    file called 'counterlock.txt'  You will need to delete this file to get 
    the counter to work again.

  - The counterhosts.txt file contains the hostname and user name 
    (if available) of the person making the hit.

  - The counterlinks.txt file contains the URL of the page 
    referencing the counter.

  - If any of the data files that vcount uses (count.txt
    counterhosts.txt, counterlinks.txt) do not exist with the counter is
    accessed, the counter will try to create them. 

MORE TO COME

  I plan to make a gif version of this program as soon as I figure out 
  LZW compression.  Anybody have any good sources?

  I plan to add a date stamp to the hosts data file.  If anyone else has 
  ideas for what data tracking they would like to see, please send me email.
 
EXAMPLES

  You can see this counter in action on my home page:

	http://www.rt66.com/smeagol/

 
