From owner-freebsd-chat Sat Apr 17 9:59:10 1999 Delivered-To: freebsd-chat@freebsd.org Received: from pop02.globecomm.net (pop02.globecomm.net [206.253.129.186]) by hub.freebsd.org (Postfix) with ESMTP id 0878F1511B for ; Sat, 17 Apr 1999 09:59:07 -0700 (PDT) (envelope-from zen@buddhist.com) Received: from WhizKid (r41.bfm.org [208.18.213.137]) by pop02.globecomm.net (8.9.0/8.8.0) with SMTP id MAA11206; Sat, 17 Apr 1999 12:58:02 -0400 (EDT) Message-Id: <3.0.6.32.19990417115545.00915770@mail.bfm.org> X-Sender: stanislav@mail.bfm.org X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Sat, 17 Apr 1999 11:55:45 -0500 To: Amancio Hasty From: "G. Adam Stanislav" Subject: Re: Applications Cc: chat@FreeBSD.ORG In-Reply-To: <199904162349.QAA94707@rah.star-gate.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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