Creating a Hit Counter at NetRunner

Since Tuesday, December 05, 1995 people have visited this page.

A bit of Info

Hit Counters are like a little odometer which runs on your page. Every time the page is accessed they increase by one. They are in no way accurate, but are good for a general idea how well or poorly a page is doing.
If these Hit Counters start to bog down the system or in anyway become a pain in the butt they will be removed!

What you can do with your counter....

You may place an ornamental 3D frame around the counter image in any thickness or color.
Any color of the counter image can be made transparent.
You may select from a number of different digit styles.
A maximum number of digits can be set, or counter can be displayed with exact number of digits.

A Variety of Digit Styles

(The text alongside will make sense a little further down the page)

A: dd=A wxh=15;20 ft=5 frgb=100;139;216

B: dd=B wxh=15;20 ft=7 frgb=192;192;192

C: dd=C wxh=15;20 ft=8 frgb=255;255;255

D: dd=D wxh=9;13 ft=2 frgb=100;100;100

E: dd=E wxh=40;40 ft=9 frgb=100;0;100

F: dd=F wxh=26;45 ft=2 frgb=0;0;0

G: dd=G wxh=37;45 ft=7 frgb=0;128;128

H: dd=H wxh=15;20 ft=0 frgb=100;100;100

I: dd=I wxh=24;28 ft=4 frgb=100;00;189

J: dd=J wxh=24;28 ft=5 frgb=0;0;255

K: dd=K wxh=24;30 ft=15 frgb=255;0;0

OK...How do I use it? This is what the markup looks like:

<img src="/cgi-bin/Count.cgi?ft=9|frgb=69;139;50|tr=0|trgb=0;0;0|wxh=15;20|
md=6|dd=A|st=0|sh=1|df=[username].dat" align=absmiddle>

CRITICAL The string between ? and " is called the QUERY_STRING. Make sure there are no carriage returns in the <img src= line> and no spaces in the QUERY_STRING. Separate the strings with pipes (|). Here's a run down

ft=9

ft is frame thickness. In this example, 9 is the thickness of the frame in pixels. This value can be any positive number greater than 1. For a nice 3D effect, use a number greater than 5. If you don't want a frame, just use ft=0. The above examples show a variety of frames.

frgb=69;139;50

frgb defines the color of the frame. Here 69 is the red component, 139 is the green component and 50 is the blue component of the color. The valid range of each component is >=0 and <= 255. The components must be separated by the ; character. IMPORTANT!!!! You must have SOME number here; even if you don't want a frame (as in ft=0)!

tr=0

tr defines if you want transparency in the counter image. With tr=0; you get a non-transparent image. If you want a transparent image, define tr=1. This is an "on/off" switch.

trgb=0;0;0

If tr=1, then the black color of the image will be transparent. In this example, 0;0;0 stands for the red, green and blue components of the color you want to make transparent.

wxh=15;20

wxh defines the width and height of an individual digit image.You can get the proper string from the above examples. If you get this wrong the image will look funny.

md=6

md defines the maximum number of digits to display. It can be >= 5 and <= 10. If your counter number is less than md, the left digits will be padded with zeros. Here md=6 displays the counter with a maximum of 6 digits. If you do not want to pad with zeros, use pad=0 instead of md=6. Example "K" shows an md of 10. Note, you can either use md=some_number or pad=0, in this field, you can not use both. If you use pad=0, then the digits will be displayed without padding. The counter at the very top of the page shows pad=0.

dd=A

dd means digit directory. A indicates it will use LED digits located at the directory A. The above examples show which directory each digit face is located in.

st=5

Just make sure you put in st=5.

sh=1

Just make sure you put in sh=1.

df=count.dat

df means data file. This is the file that will contain the counter number. Enter your [username].dat. Don't include the "[]" symbols.

Some Random Stuff

  • All these options must be in the same order as shown, all in lower case and all of them must exist.
  • This Program was created by M Muquit and heavily hacked by Sabercat!. NetRunner thanks Mr. Muquit for the code.
  • Each user may use ONE (1) counter per site. Don't call and ask for more unless you've got your credit card in hand.
  • An easy way to get one of these running on your page is to "view source" and snare the code for a working one that you like. All you have to do is change the |username.dat| string to your username.
  • This counter will not run unless called from a Netrunner Site...therefore don't waste your time on a "counter terrorism" project.
  • NO! We will not reset your counter!

It Don't Work!

Sorry....don't call the office! I'm the WEBMASTER not the COUNTERMASTER! With over 3000 users I could spend every waking hour supporting such a feature rich program such as this. If you run into problems return to this page and STUDY IT! View the source, check your code...there's lots of places to go wrong.


If you get this message or another one like it THEN call the office...it will be rapidly corrected...Good Luck and happy Counting!

Copyright 1997-2024 NetRunner Inc. All Rights Reserved.