Placing a counter on your Web site
allows you to track the number of vistors to your page or pages.
The CommunityNet counter is a CGI script already on our server.
There are only a couple of steps that you must take to put a counter
on your page.
Note: |
It is not necessary to have an
extensive knowledge of HTML or CGI in order to put
a counter on your page, but it helps if you want to know how
it works.
This counter will only work on the CommunityNet server. |
-
Server Side Include (SSI) command
Place the following Server Side Include (SSI) command in your
HTML where you want the counter to appear.
<!--#include virtual="/cgi-bin/hwcncount"
-->
- Use the CHMOD option in your FTP program.
In order to execute the SSI, we need to set the file's 'owner
execution' permission flag, so that the server will know to look
for these commands hidden in the HTML comments.
In WS-FTP_LE, right click on the name of your web page in the
Remote (HWCN side) directory display, and a menu will pop
up with chmod (UNIX) listed. Click on that, and you will
see a dialog box with permissions checkboxes. Check the box for
Execute box under the heading Owner OR change the
Numeric value to 744. Click on OK.
You should now see the following on your page.
Counter Styles
To change the look of your counter you only need to
add additional SSI command(s) ABOVE the initial SSI command
of <!--#include virtual="/cgi-bin/hwcncount"
-->.
Below are the SSI commands and the style of counter
that they produce.
| |
| The SSI command: |
<!--#include
virtual="/cgi-bin/hwcncount" --> |
| Produces the following counter: |
|
|
| |
| The SSI commands: |
<!--#set
var="output" value="compact" -->
<!--#include virtual="/cgi-bin/hwcncount" -->
|
| Produces the following counter: |
|
|
| |
| The SSI commands: |
<!--#set
var="output" value="hosted" -->
<!--#include virtual="/cgi-bin/hwcncount" --> |
| Produces the following counter: |
|
|
| |
| The SSI commands: |
<!--#set
var="output" value="hosted,compact" -->
<!--#include virtual="/cgi-bin/hwcncount" --> |
| Produces the following counter: |
|
|
| |
| The SSI commands: |
<!--#set
var="output" value="text,all" -->
<!--#include virtual="/cgi-bin/hwcncount" -->
|
| Produces the following counter: |
Count on Your CommunityNet!
1 visitors today, 1 this week, 45 this month, 8092 since 2003/06/01
Lynx Hits: 676, HWCN PPP Hits: 37, Offsite Hits: 7379
|
| |
| The SSI commands: |
<!--#set
var="output" value="text,compact" -->
<!--#include virtual="/cgi-bin/hwcncount" -->
|
| Produces the following counter: |
|
Count on HWCN: 8092 visitors since 2003/06/01.
|
| |
| The SSI commands: |
<!--#set
var="output" value="total" -->
You are visitor # <!--#include
virtual="/cgi-bin/hwcncount" -->
to this web page. |
| Produces the following counter: |
|
You are visitor #
8092
to this web page. |
| |
Resetting Your Counter
If you decide to reset your counter to 0, or if you wish to start
your counter at a specific number, insert the follow command before
the initial counter command so that it may look like the following:
<!--#set var="count" value="reset,x,yyyy/mm/dd"
-->
<!--#include virtual="/cgi-bin/hwcncount"
-->
where x is the number you want the counter at, and yyyy/mm/dd is
the date. Upload the page to the server and then refresh it in the
browser. The counter should now be reset. Remove the line you just
added and upload the page again (If you do not do this last step
the counter will continue to reset at the value of x, and will not
track the hits to your page).
|