Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Apr 1999 11:55:45 -0500
From:      "G. Adam Stanislav" <zen@buddhist.com>
To:        Amancio Hasty <hasty@rah.star-gate.com>
Cc:        chat@FreeBSD.ORG
Subject:   Re: Applications 
Message-ID:  <3.0.6.32.19990417115545.00915770@mail.bfm.org>
In-Reply-To: <199904162349.QAA94707@rah.star-gate.com>
References:  <Your message of "Fri, 16 Apr 1999 16:15:03 CDT."             <3.0.6.32.19990416161503.0092d260@mail.bfm.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At 16:49 16-04-1999 -0700, Amancio Hasty wrote:
>Very interested in your web page counter for I forsee a need for a forum
>or a web page with all kinds of neat info on native freebsd apps . A native
>freebsd page counter would be nice to have.

It is not a counter per se but a counter language. It allows you to design
your own original counters. You provide gif files with images of the
digits, and it will assemble the counter for you. You can also provide a
background image, a head and a tail. The images can all be in separate
files, in one file, or linked directly into the executable, or any
combination of that.

The counter can be horizontal or vertical, it can have a frame or not have
one. If you use a background image, you can control the position of the
digit layer as related to the background layer. You can kern the digits,
align them along the center, bottom, or top (or left and right in vertical
counters).

It can be used to produce text counters instead of graphic ones; as well as
display current date and time in any time zone, again either as an image or
as text.

You can set conditions as to when not to increase the count (e.g., I do not
increase my counters when I log onto my web site).

It can fork another program in the background which can read the count from
an environment variable. It can be used to redirect the user to a different
web page (or web site anywhere), and keep track of how many times that
happened.

It can keep track of visitors on a daily, weekly, monthly, or annual basis.
Things like that.

And, of course, you can create as many different counters with it as you
want. You just write several lines of a script. You then execute the script
from your web page. The count is inside the script (GCL will overwrite the
script when it increases the counter), so you only need one file per
counter (aside from the gifs, of course), which is plain text.

The funniest thing about it is that I wrote it because I have a CGI
tutorial on my web site, and wanted to write a simple counter program
simply to teach people how they can write their own. But I kept adding
features to it, and version 1.0 was more than 4,000 lines of C code (it
took a week to write). Current version (2.10) has more than 5,000 lines of
code. So it became one of those "we work hard so you don't have to" things.
:-)

There is only one thing I can think of adding in a future version: Changing
it to BCD-style math internally. Right now it uses a 32-bit unsigned
integer for its math, so it is limited to slightly more than 4 billion
counts. That should not be a problem for most web sites, but I would like
to remove that limitation.

Adam
---
Want to design your own web counter?
Get GCL 2.10 from http://www.whizkidtech.net/gcl/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.6.32.19990417115545.00915770>