QUESTION One thing that I really want to add to my Web pages that isn't covered in your book is a counter to keep track of 'hits'. An aquaintance gave me this rather cryptic line of HTML code...ANSWER<!--#EXEC CGI="/cgi-bin/counter"-->I get a 'don't get it error' when I put it into a script as is... what is this cgi stuff all about?Counters are a recent addition to Web pages that can be done in a variety of different ways, notably through specifying a graphic that's actually a program or having an on-the-fly inclusion of a numeric value by having a program executed as the page is sent to the browser.
To accomplish the first, you simply specify a regular image include that happens to point to the program in question (that lives in the CGI - Common Gateway Interface - binary directory):
<img src="/cgi-bin/Counter.cgi" align=absmiddle>Most of these are designed to work with Unix servers, but if you poke around Yahoo you'll find some PC and Mac counters to check out.The other solution to this, if you want a text-based counter rather than a graphic, requires what's called a server-side include. A server-side include, is done by specifying an instruction that's buried within an HTML comment - just like the snippet you got from your friend. This is a bit more difficult because you need to have a Web server that is actually scanning the HTML files as it sends them out - which will slow it down and clog the system, potentially. One way around this is some servers let you specify files as '.shtml' which says "check for server-side includes", and another is to have it in a special directory. If you want to use this strategy, talk with the folk who run your server for tips on how it's configured.
There are a bunch of fun pages on the net that talk about this. Here's two that I think are good starting points:
http://cervantes.comptons.com/digits/digits.htm
http://www.digits.com/web_counter/![]()