From: George Carmichael Date: Wed, 5 Jul 95 08:43:55 -0600 Subject: Re: GEO-Counter & logic of code How to use counter is at http://www.ualberta.ca/GEO/Counter.html As for the source code, it's still too kludgy to be released. Here are a few tips, though. "High Use" should probably still be written in C. (I think part of my server problem is having a fast machine NOT keep up with re-interpreting the Perl code every time someone asks for a "hit") Consider using other people's libraries, such as libwww and PerlLib for general http/web stuff, and Imagick for graphic routines. If you're *really* new to perl, take a look at my mailer example code at http://www.ualberta.ca/GEO/Mailer.html Anyway, here's the basic logic of this trivial program. Get an argument into the code (you can use Mailer as an example on how to do this) Identify the main argument and locate the appropriate file that matches this counter Add one. Do other house keeping (like finding out from the environment variables who visited, etc) and save the results in appropriate files Convert the number to either an XBM or GIF. (Consider using the "montage" program from the ImageMagick routines http://www.wizards.dupont.com/cristy/ImageMagick.html) Write out a MIME header that says "I'm sending a graphic" ie ("Content-type: image/gif ") Write out the converted gif/xbm number. This started as a very trivial program. The hassles came in later (managing the files, blacklisting some sites, error checking, etc) George Begin forwarded message: Date: Wed, 05 Jul 95 11:16:59 -0700 X-Mailer: Mozilla 1.1N (Windows; I; 16bit) To: George.Carmichael@UAlberta.CA Subject: GEO-Counter We like your GEO-COUNTER - can you let us know how to do it - we would like details of the number of accesses and the recent users - our 'techies' keep giving us the impression that it is very difficult and never get around to doing it for us. Some information about how to do it (listings would be even better!) will give us a bit of ammunition to tackle our 'techies' Thanks