G Web Server Examples

Counter CGI

Often people embed an image in their page that shows how many times this page has been accessed. This image is generated by a CGI application that keeps track of how many times a URL has been hit.

The following embedded image has been generated by a CGI that takes a single parameter and returns an image showing how many time it has been called with this parameter. The HTML code for the image is

<IMG SRC="/cgi-bin/counter.vi?/cgi-bin/examples/counter.htm">



When you reload the page, the CGI is called again and the number in the image is incremented.


© National Instruments