Using a Counter at www.wsu.edu


IT UNIX Systems

Using a Unique Link Name
Other www.wsu.edu servers
Selecting Other Fonts
Font Magnification

At www.wsu.edu it is possible to tell the counter program to keep track of how many times your page has been accessed.

For example, this page has been accessed times since April 25th, 1996.

This is accomplished using the nph-count program Counter 1.2 .

Using a Unique Link Name

You tell the www server that you want included in the html stream a gif file with the number of accesses by entering a call to nph-count. For example, the page counter that was used at the top of this page was created by entering the following html code:

this page has been accessed <IMG SRC= "/cgi-bin/nph-count?width=5& link=/UNIX_Systems/using_counter.html">
times since April 25th, 1996.

If you wanted to index your own page, and it was in your home public_html directory you would enter something like (if your username is " clint"):

this page has been accessed <IMG SRC= "/cgi-bin/nph-count?width=5& link=/~clint/index.html">
times.

If you owned a file called ResourceTools.html that was in the directory UNIX_Systems at www.wsu.edu you could put a counter in that html file by entering:

this page has been accessed <IMG SRC= "/cgi-bin/nph-count?width=5& link=/UNIX_Systems/ResourceTools.html">
times.

It is important to use a unique html link name with nph-count. Using " index.html " would not be very unique. Instead, add the full path name. For example, if your user name is clint you would say:

" /~clint/index.html "

or another html file of yours could be

" /~clint/user_information.html "

If you have files not in the public_html directory, you still need to use the full UNIX path. For example:

" /Docs/Weekly/Concerns.html "

Other www.wsu.edu servers

The above works for all references using the 80 and 8080 servers at www.wsu.edu. If you are using others (such as 8000) you need to add the full specification including the default server. In the following example, the " http://www.wsu.edu " was necessary to add if using the 8000 server at www.wsu.edu:

this page has been accessed <IMG SRC= "http://www.wsu.edu/cgi-bin/nph-count?width=5 &link=/~clint/index.html">
times.

Selecting Other Fonts

You can select other fonts than the default font listed above. This is done with the font parameter. For example, if you wanted to use font "15" you would say:

this page has been accessed <IMG SRC= "/cgi-bin/nph-count?font=15&width=5& link=/UNIX_Systems/using_counter.html">
times since April 25th, 1996.

 

For example, this page has been accessed times since April 25th, 1996.

Here is a complete list of fonts.

Refer to Counter 1.2 for more info on this option.

Font Magnification

It is possible to increase or decrease the size of a font with the mag parameter. A positive value will increase the size of the font and a negative value will decrease the size of the font. For example, to decrease the default font's size you could say:

this page has been accessed <IMG SRC= "/cgi-bin/nph-count?mag=-5&width=5& link=/UNIX_Systems/using_counter.html">
times since April 25th, 1996.

 

This page has been accessed times since April 25th, 1996.

Don't use very large values to decrease the size. The default dimensions are 15x20.

Some of the fonts look better if increased in size. For example,

this page has been accessed <IMG SRC= "/cgi-bin/nph-count?font=7&mag=10& width=5&link=/UNIX_Systems/using_counter.html ">
times since April 25th, 1996.

This page has been accessed times since April 25th, 1996.

and also the "banana" font looks better bigger:

 

this page has been accessed <IMG SRC= "/cgi-bin/nph-count?font=8&mag=20& width=5&link=/UNIX_Systems/using_counter.html ">
times since April 25th, 1996.

This page has been accessed times since April 25th, 1996.

 

Here is the full documentation for Counter 1.2 .


| Home | Search | Software List | IT Help Desk |

Questions and Help from: helpdesk@wsu.edu
Comments to:
usgwww@wsu.edu .
Revised February 05, 1997.
Copyright 1996-1997 Washington State University.
URL: http://www.wsu.edu/UNIX_Systems