About Count WWWebula

Count WWWebula is a graphical access counter, for use with MacOS web servers running WebStar, Microsoft's Personal Web Server, NetPresenz (CGI Only), Quid Pro Quo, or MacHTTP 2.2 (CGI Only), or AppleShareIP 5.0 (5.0.3 for Plugin). If it is installed and running correctly, your web pages will display the total number of "hits" or accesses for each page, in the form of a GIF image.

The counter runs very quickly as it is written in Macintosh C++ code instead of the AppleScript implementations you might have seen before. The Plugin version is also twice as fast as it's CGI counterpart. This is due to the fact that Code Fragment Plugins are actually running as part of the web server application. CGIs have to communicate to web servers through slow AppleEvents. Count WWWebula was built with Metrowerks C++, using Grant's CGI framework (with my PowerPlant extensions).

Count WWWebula isshareware. For the plugin version, everyone must pay the shareware fee. $30 for each server using the plugin (for more details, please see the license agreement included with the archive). The CGI version is free to individuals, educational institutions, and non-profit orgnizations. Commercial companies and government entities must fork out $25. You can pay the fee(s) via the included "Register" application, or secure on-line registration.

  • Step-by-Step instructions on set-up.
  • Implementing different digit fonts.
  • How to "pad" the counter gif with zeros.
  • Simple Internet Version Control (SIVC) features.
  • Neat Tricks.
  • Trouble-shooting.
  • Special thanks.
  • In order to get the counter up and running you will need to do the following:

    (1) (THIS STEP FOR THE PLUGIN VERSION ONLY) Place the folder titled "Counter Data Files" inside the your web server's "Plug-Ins" folder. Put all your font folders ( i.e. 'digitdir' ) inside this "Counter Data Files" folder. Place the countwwwebula-plugin in your web server's "Plug-Ins" folder. Then place the Count WWWebula Plugin Setup application anywhere on your Server's hard drive.

    (2) (THIS STEP FOR THE CGI VERSION ONLY) Place the folder titled "Counter" inside the folder where you keep the rest of your CGIs and AppleScripts. If you do not have any CGIs inside a folder, it's a good idea to keep them there. In the following example, we'll assume your CGI folder is titled "cgi-bin", which, in most cases, should be in the same folder as your mac web server application (i.e. 'WebStar'). Inside the "Counter" folder, make sure that the application titled "Counter.acgi" and the folder "Counter Data Files" are in place. Otherwise our example will not function properly.

    (3) Double-Click on the "Counter.acgi" application (for CGI) or the "Count WWWebula Plugin Setup" application (for Plugin). Once it has been activated, select "Preferences" from the "Options" Menu.

    Please note that several of the following preference settings are available in the plugin version via remote administration, "/pi_admin.count". Make sure that you set up security on your web server to ask for a user name and password anytime "pi_admin" is called from a browser.

    example referral list

    Once the preferences dialog is up, select the tab item "Referral URLs" at the top of the preferences box (the tab in the middle). You will now need to delete all the restriction sites in the list box titled "Restrict referrals to URLs with:", by selecting a site, and clicking the delete key. (If there are any already in there). Now, here's the rough part so stay with me:

    (4) You need to find out what the domain name is of your Web Server, as well as it's IP address. Click on the button titled "New". A dialog box will appear asking you to type in a full or partial domain name or IP address. Type in the full domain name now. (Note: currently this is case sensitive, for most people it will be all lower case letters in the domain name). Click "OK". You should now see the domain name you typed inside the list box of the preferences dialog. Click "New" again. Now type in the numerical IP address and click "OK".

    You have just restricted counter usage to your web server. The counter will still be tripped, and viewable by other people, they just cannot use your counter for their page on some remote server. This is called "Counter Terrorism." Losers who use other people's counters on complete seperate computers (sometimes in different countries) without permission. People like this are the reason why we have all these restrictions.

    Now, if you will also be counting web pages that are NOT on this web server, you must add the domain name and IP address of the server that they are on. Alternately, you can include a partial domain name or IP address. If I wanted anyone at the University of Texas to be able to use/access my counter (a very bad idea, that gives 60,000 people the privilege of using my counter on MY web server.), I would just add "utexas.edu" and "128.83" to the restrictions list. The restrictions work by matching any item in the restrictions list to any portion of the "Referring URL". "Referring URL" meaning a URL to a page that includes your counter on it.

    ignore preferences example

    (5) If you want it so that anyone who's viewing your web page that is inside a certain domain or ip address, won't affect the count on the counter, select the tab item "Ignore" at the top of the preferences box (the tab on the right), then put that domain AND ip address in the "Don't count hits from URLs with:" list. In other words, using the above example as a start, if I don't want anyone in the education building at UT to increment my count of my web page (since I may edit, view, and debug my homepage from any number of machines in a computer lab), I would put the building's domain name, and ip in the list. If I had my own office computer (which I didn't), then I would probably just put that machine's domain name and ip address in the list. That way everyone but me gets counted on the counter.

    application preferences example

    (6) (THIS STEP FOR THE CGI VERSION ONLY) If you don't want your CGI to quit after a period of inactivity, uncheck the menu item "Quit On Idle" in the "Options" menu. Otherwise, select the tab item "General Prefs" at the top of the preferences box (the tab on the left), then put how ever many minutes of idle time you'd like it to quit after in the "Quit CGI after..." box.

    (7) Click the Save button or hit the Return button ... this will save your preferences in a preferences file in the "Preferences" folder.

    (8) If you would like to put an access count on your "Default.html" page, open it up in your favorite text or html editor. Include the following line of text somewhere in your document:

    (CGI:)A total of <img src="/cgi-bin/counter/counter.acgi$main/default"> people have accessed this page.

    (Plugin:)A total of <img src="counter.count$main/default"> people have accessed this page.

    In the "img src" specification, anything after the "$" is an argument that goes to the plugin. The first argument ("main" in this case), is either a user name (if you are running the counter on a web server with several persons' HTML pages), or a general topic name. It is needed in order to store multiple page counts that are related, in a single data file. The file's name will be the name of the first argument ("main" or whatever). You DO NOT NEED TO CREATE ANY FILES OR FOLDERS!!! The counter will take care of all the file creation for you. More on this in a second.

    The second argument is a page index, or some other unique name that you can remember belongs to a specific page's count. I always just use the first name of the html file, "default" in this case. Both the first argument and the second need to be one word only each. Both should contain only alphanumeric characters, no dashes, bullets, parenthesis, or anything like that.

    In my case, there are about 3 different users on one web server. So I could just use my first name as the first argument, and whatever page I'm counting as the second. If the page that I'm counting is my personal information page, "personal.html", I would probably include the following in "personal.html":

    (CGI:)A total of <img src="/cgi-bin/counter/counter.acgi$greg/personal"> people have accessed this page.

    (Plugin:)A total of <img src="counter.count$greg/personal"> people have accessed this page.

    If you run your own WWW server, and no other users will be using it, you can just use a topical approach to the first argument. If I wanted to add access counters to all the pages in the cryptography section of my homepage, (in this case, the particular page in question would be "crypto_ftp.html") I would do this:

    (CGI:)A total of <img src="/cgi-bin/counter/counter.acgi$crypto/ftp"> people have accessed this page.

    (Plugin:)A total of <img src="counter.count$crypto/ftp"> people have accessed this page.

    Or if the counter were on my Macintosh Cryptography Interface Project (MCIP) page, I would probably include the following in "mcip.html":

    (CGI:)A total of <img src="/cgi-bin/counter/counter.acgi$crypto/mcip"> people have accessed this page.

    (Plugin:)A total of <img src="counter.count$crypto/mcip"> people have accessed this page.

    (9) Once you have added that line of text in your page, save it and put it back on your web server.

    (10) Now access that page as you would normally. Note: It's necessary to access it via a URL instead opening it in your web browser "locally" via a Standard Get File Dialog Box.

    (11) If things went well, you should see a gif looking like an odometer on your homepage. Otherwise, you'll probably see a "Failed" message or "Access Denied". In the case of "Access Denied" you'll want to check your site restrictions in the preferences dialog box. Also, might peek inside the CountWWWebula Error Log file for any noticable problems. If can't figure out what went wrong, see the trouble-shooting section below.

    How to implement different digit gifs:

    If you don't like the odometer digits, or if you'd like several different sets of digits for different pages to end the monotony, you can find a list of places to get new digits in the font section at Misanthrope.

    (1) It's important to point out that any gif digits you may make in a set need to be the same size as each other. In other words, the digit zero gif image must have the same width and height dimensions as digit 6, etc.

    (2) Your new digit folder must be located in the 'Counter Data Files' folder. You can name your new digit directory any name you want, as long as it's only one word (i.e. "digital", "odometer", "funky", or whatever), with no slashes or other non-alphanumeric characters.

    (3) In order to use the gifs you've made, you need to append a "/font=", and the name of your new digit directory on the end of your calling convention, like so:

    (CGI:)A total of <img src="/cgi-bin/counter/counter.acgi$greg/personal/font=digital"> people have accessed this page.

    (Plugin:)A total of <img src="counter.count$greg/personal/font=digital"> people have accessed this page.

    This would be the case if I had a digit directory named "digital" in my 'Counter Data Files' folder.

    How to get the counter to "pad" the left of the counter gif with zeros:

    If you want all eight digits of the counter to show up in the final gif, zeros and all, do this:

    (CGI:)<img src="/cgi-bin/counter/counter.acgi$greg/personal/font=digital/width=8">

    (Plugin:)<img src="counter.count$greg/personal/font=digital/width=8">

    Or if you'd rather have only four digits show, then do this:

    (CGI:)<img src="/cgi-bin/counter/counter.acgi$greg/personal/font=digital/width=4">

    (Plugin:)<img src="counter.count$greg/personal/font=digital/width=4">

    Of course, you will have to put all your specific information in place of mine, but you get the picture. The width must ALWAYS follow the font in order. Note, you don't necessarily have to have a different font, but if you do, you must have the /width argument located after the /font argument ....

    Simple Internet Version Control (SIVC) features:

    Simple Internet Version Control is a wonderful little creature. Don't be afraid of it. Though at first it may seem dangerous to you, it is completely harmless, and quite helpful.

    What SIVC (pronounce Civic), does, is tell you when a new version of Count WWWebula has been released, and then gives you an option to easily download the new version at the click of a button. It does this by periodically contacting my SIVC server, which keeps track of the latest version of Count WWWebula Plugin, as well as it's homepage and the FTP site where it's located. When it contacts the SIVC server, it also allows me to keep an accurate account of the number of people who are using Count WWWebula. You may check the current version information, as well as find out the current total number of users by selecting the "Current Version Info..." menu item in the Options menu of the CGI or the Plugin's Setup application. It will contact the server, then produce a dialog like the following:

    SIVC Info DLOG

    Clicking on the "Download" (downloads the latest version for you) or the "Product Information" (opens the counter homepage) button requires you to have Internet Config 1.1 (or later) installed on your computer.

    It needs this so it can find out what Web Broswer and FTP Client you prefer to use. As you can see, the number of known users is shown, as well as the time the total count has been active, and how "sure" it is of it's accuracy.

    It's important to note that SIVC doesn't send me any private information. I don't ever see your email address, name, type of computer, or what software you might be using. The only thing the SIVC server receives back from the client is the time of first access, and the domain name of the machine on which the client resides. It uses the domain name to keep an accurate account of how many people are using it. That's it.

    If you still feel threatened by SIVC, or you don't want the extra TCP activity, you may disable it by unchecking the checkbox in the application preferences dialog box as shown way above.

    Neat Tricks:

    To speed the loading of web pages that use Count WWWebula, use the "/width=x" tag combined with a "height=xx width=xx" tag in the URL. The height and width of all of the digits should be identical; therefore, the "height" tag will be the standard height, and the "width" value will be the standard width times the value of the "/width" tag.

    For example, if your digits are each 11 pixels wide by 16 pixels tall, and you want four digits in your counter:

    (CGI:)<img src="/cgi-bin/counter/counter.acgi$greg/personal/font=digital/width=4" height=16 width=44>

    (Plugin:)<img src="counter.count$greg/personal/font=digital/width=4" height=16 width=44>

    Trouble-Shooting:

    If you have problems setting up the counter, and you've followed all the directions and you still can't figure it out, I've set up a web page with FAQs and more documentstion that might help you out:

    http://www.misanthrope.net/htmls/counter/
    (or you may click on "Count WWWebula" in the about box dialog)

    If that still doesn't help, use the bug reporting service, in it you can enclose MacsBug logs, or error logs, and any other useful information you have. Just press the "Add a new slip" button to start the process.

    For Count WWWebula questions and problems, you can reach me at "support" at "misanthrope.net".


    SPECIAL THANKS GO TO:

    Chris W. Johnson and Peter Lewis for the SIVC implementation code.

    Thurman Gillespy III and Charles Wilson for helping me get everything ported over to Mac's File Manager from ANSI C file calls.

    Stephen Tallent for the groovy icon.

    Grant Neufeld for all his CGI Framework updates and helpful work on returning binary data to WebStar.

    Daaron Dwyer for helping me with the preferences dialog box in 1.2.3 and earlier.

    Thanks to all the above, and to Chuck Shotton, Ian Bell, Nathan Tableman, Martin Leach, and plenty of others, for helping in the development stages of the application.


    Copyright 1995-99, Gregory S. Combs
    "support" at "misanthrope.net"
    http://www.misanthrope.net