Trinidad LighthouseNorthcoast Internet, Inc.Redwood Tree
MainAboutMember AreaServicesRegional Resources
Members3144 Broadway, Eureka, Ca (707) 443-6803
Installing a hit counter on your web page
 
  Adding a basic hit counter to your web page is easy and free. It keeps a running total of how many times your page has been loaded by anyone. Every time your page loads, the counter increases by 1.

Simply add the following line to the HTML code of your web page. Please note, this only works for Northcoast Internet subscribers.

Example:
<img src="/cgi-bin/Count.cgi?df=example.dat">

Where you see "example.dat" replace it with your own unique file name in lowercase.

The data file keeps track of your page's web hits and is stored in a common directory for all NCI subscribers. Do not use a file name that is a single word because someone else might be using it too. If that happened, you and the other user would see misleading information about both page's activity. It is best to choose a name that combines at least two words that no one else would be likely to use.


Changing styles

There are five digit styles available to you, labeled A, B, C, D, and E. Switch between them with the dd=X command where X is a letter between A and E. Use the corresponding examples to select the style you desire.

Style A:
<img src="/cgi-bin/Count.cgi?dd=A|df=example.dat">
Counter Example

Style B:
<img src="/cgi-bin/Count.cgi?dd=B|df=example.dat">
Counter Example

Style C:
<img src="/cgi-bin/Count.cgi?dd=C|df=example.dat">
Counter Example

Style D. This example has extra code to reduce the size of the border.
<img src="/cgi-bin/Count.cgi?dd=D|ft=3|df=example.dat">
Counter Example

Style E. This example has extra code to change the color and reduce the border.
<img src="/cgi-bin/Count.cgi?ft=2&frgb=000000&dd=E|df=
example.dat"> Counter Example


Digit color

You can change your digit color. The extra commands are srgb=X|prgb=X where each X is a hexidecimal number representing a color. You need to know the hexidecimal value for the color you want to replace and for the new color. See this color mapping chart as a reference.

srgb= is for specifying the color value in your existing digits you wish to change.
prgb= is for specifying the new color value you want to see.

Note, this example only works for this particular digit style. It changes the source srgb value from green to a new color.

The original:
<img src="/cgi-bin/Count.cgi?dd=A|df=example.dat">
Counter Example

Changed to white:
<img src="/cgi-bin/Count.cgi?dd=A|df=
example.dat|srgb=00ff00|prgb=FFFFFF">
Counter Example

Changed to black:
<img src="/cgi-bin/Count.cgi?dd=A|df=
example.dat|srgb=00ff00|prgb=000000">
Counter Example

Changed to red:
<img src="/cgi-bin/Count.cgi?dd=A|df=
example.dat|srgb=00ff00|prgb=ff0000">
Counter Example


Transparency

To make the background transparent, add &trgb=0;0;0 in the appropriate place. This example also has the digit color changed to red.

<img src="/cgi-bin/Count.cgi?dd=A&trgb=0;0;0|
df=example.dat|srgb=00ff00|prgb=ff0000">
Counter Example


Frame thickness

The command to change frame thickness is ft=X, where X is a number. The higher the number, the bigger the border. If you use 1, there is no border. This example also has a red digit color and transparent background.

Border of 6. You can specify a larger size, but this is the default:
<img src="/cgi-bin/Count.cgi?ft=6|dd=A&trgb=0;0;0|df=
example.dat|srgb=00ff00|prgb=ff0000">
Counter Example

Border of 5:
<img src="/cgi-bin/Count.cgi?ft=5|dd=A&trgb=0;0;0|df=
example.dat|srgb=00ff00|prgb=ff0000">
Counter Example

Border of 4:
<img src="/cgi-bin/Count.cgi?ft=4|dd=A&trgb=0;0;0|df=
example.dat |srgb=00ff00|prgb=ff0000">
Counter Example

Border of 3:
<img src="/cgi-bin/Count.cgi?ft=3|dd=A&trgb=0;0;0|df=
example.dat|srgb=00ff00|prgb=ff0000">
Counter Example

Border of 2:
<img src="/cgi-bin/Count.cgi?ft=2|dd=A&trgb=0;0;0|df=
example.dat |srgb=00ff00|prgb=ff0000">
Counter Example

Border of 1:
<img src="/cgi-bin/Count.cgi?ft=1|dd=A&trgb=0;0;0|df=
example.dat |srgb=00ff00|prgb=ff0000">
Counter Example


Frame color

The command to change frame color is frgb=X, where X is a hexidecimal number corresponding to a color. See this color mapping chart for these codes.

White frame:
<img src="/cgi-bin/Count.cgi?frgb=FFFFFF|ft=6|dd=A&trgb=0;0;
0|df=example.dat|srgb=00ff00|prgb=ff0000">
Counter Example

Blue frame:
<img src="/cgi-bin/Count.cgi?frgb=0000FF|ft=6|dd=A&trgb=0;0;0|
df=example.dat|srgb=00ff00|prgb=ff0000">
Counter Example

Red frame:
<img src="/cgi-bin/Count.cgi?frgb=ff0000|ft=6|dd=A&trgb=0;0;0|
df=example.dat|srgb=00ff00|prgb=ff0000">
Counter Example


Doing more

This counter, appropriately named "Counter," was written by a couple guys named Muhammad A Muquit and Kevin J. Walsh for free. That's right, there are good people in the world.

There are lots of extra options available, but if you want to use completely new digit images, you must install the counter in your own user directory (which is complicated, but can be done). Check out the Count manual for more information and features.


Time and Date.

To display time in 12 hour format use this command:
<img src="/cgi-bin/Count.cgi?dd=A|display=clock">

To display time in 24 hour format use this command:
<img src="/cgi-bin/Count.cgi?dd=A|display=clock|tformat=24">

To display the date, use this command:
<img src="/cgi-bin/Count.cgi?dd=A|display=date">

You can use the five different digit styles (A-E) described above in the Web hit counter instructions and change the border color and thickness using the same counter commands.

For example, here is today's date in digit style B:
<img src="/cgi-bin/Count.cgi?dd=B|display=date">

Return to Help Desk Index


  [Top]

 

Click here to contact us!
Contact Us