FIU WWW Homepage Access Counter

This information was updated in 3/00.
Please note the change on the image source line that now refers to the new CGI system: cgi.fiu.edu

Text taken from original distribution notes. Information contained herein applies to FIU users only. If you have questions regarding this program's implementation, send a mail message to webmaster@fiu.edu

[ FIU WWW Main Help Page ]


First Steps

  1. Read through the rest of the instructions and parameters listed.
  2. Only FIU users can access the form below.
  3. Fill out the counter file request form requesting a datafile called username.dat (where username is your FIU unix username) be created for you. At this time, only one counter per username is being permitted.
  4. Place the code below on the page to be counted.

How do I call the program?

<img src="http://cgi.fiu.edu/cgi-bin/count.cgi?ft=9|frgb=69;139;50|tr=0|trgb=0;0;0|wxh=15;20|md=6|dd=A|st=5|sh=1|df=username.dat" align=absmiddle>

Examples of counter implementations

The string between ? and " is called the QUERY_STRING. Make sure there is no newlines in the <img src= line and no space in the QUERY_STRING. Here:
    ft=9
       ft means frame thickness. If you want to wrap the counter
       with a ornamental frame, you define the frame thickness
       like this. Here 9 is the thickness of the frame in pixel.
       This value can be any positive number more than 1. For nice
       3D effect, use a number more than 5. If you do not want
       frame, just use ft=0.

    frgb=69;139;50
       frgb defines the color of the frame. Here 69 is the red
       component, 139 is the green component and 50 is the blue
       component of the color. The valid range of each component
       is >=0 and <= 255. The components must be separated by ;
       character. Note even if you define ft=0, these components
       must be present, just use 0;0;0 in that case.

    tr=0
       tr defines if you want transparency in the counter image.
       here tr=0, that is I do not want transparent image. If you
       want transparent image, define tr=1. Note that Coun.cgi,
       does not care if your digits are transparent GIFs or not.
       You must tell explicitly which color you want to make
       transparent.

    trgb=0;0;0
       if tr=1, then black color of the image will get transparent.
       Here 0;0;0 are the red, green and blue component of the color
       you want to make transparent.

    wxh=15;20
       wxh string defines the width and height of an individual
       digit image. Each digits must have the same width and
       height. If you like to use digits not supplied with my
       distribution, find out the width and height of the digits
       and specify them here.

    md=6
       md defines the maximum number of digits to display. It can be
       >= 5 and <= 10. If your counter number is less than md, the
       left digits will be padded with zeros. Here md=6 means, display
       the counter with maximum 6 digits. f you do not want
       to left pad with zeros, use pad=0 instead of md=6.
       Note you can either use md=some_number or pad=0, in this
       field, you can not use both. If you use pad=0, then
       the digits will be displayed exactly without padding.

    dd=A
       dd means digit directory. A indicates, it will use my LED digits
       located at the directory A.  We have four different types of digits
       available.  Valid dd values are A, B, C, D, E, bang, cd, cdd, or cdr.

    st=5
       st means start, supposedly the value to start with.  In our 
       compiling, it does not have significance except that it must exist. 
       No matter what value you use, the counter will start at 0 and 
       increment once for each request for the counter.  Even if you raise
       the value later, it does not affect your count.  If you would like
       you count reset at any time, send a message to 
       webmaster@fiu.edu.


    sh=1
       sh means show. If sh=0, then no digit images will be displayed,
       however a transparent 1x1 transparent GIF image will be
       returned, which will give the illusion of nothing being displayed.
       Although it will seem that nothing is displayed, the counter will
       be incremented.

    df=count.dat
       finally df means data file. This is the file which will contain the
       counter number.   This file is created by the system administrator
       for you and stored on the web server.

All these options must be in the same order as told and all in lower case and all of them must exist.

Copyright
Copyright 1995 by Muhammad A Muquit. Permission to use, copy and modify this program for personal use is hereby granted without fee, provided that the program is not used for any financial gain and this copyright notice appear in all copies and both that copyright notice and this permission notice appear in supporting documentation. If the progam is ported to some other platform, no binary only distribution is allowed, the source and this copyright notice must be included with the distribution. This program is provided "as is" without express or implied warranty. Note: This program is developed in my own time. My employer SEMCOR, Inc. has nothing to do with it.

Acknowledgment

Thanks to John Cristy for ImageMagick. I took many routines from ImageMagick for the GIF image combining library. I borrowed the font array and some code from gd library. Thanks to Tom Boutell. Thanks to all of you who showed interest in the counter program. I had fun writing it.

maintained by wsg_support