|
|


|

Using CGI Hit Counter
|

|

|

To add a counter to your home page, you will need to add a special HTML tag to your page in the precise location you wish the
counter to appear. Since the counter is implemented by an <IMG> tag, it can be
positioned and aligned by the same tags used to achieve a similar effect with any other image.
The syntax for adding this counter to your page is:
<img src="http://wapp.verizon.net/scripts/counter2.exe?df=counter">
This script will cause a file named "counter" to be created in your directory - this file will store the number of hits to your
Web page (if you delete it, the counter will be reset to zero and the file will be re-created the next time a visitor loads the
page).
Example
Visitor:
A counter similar to the one above will appear on your web page
Counter Options
The counter script can be customized by appending a combination of parameters to the HTML tag used to call it. The sample
counter, above, has two parameters:
... counter2.exe?
df=counter.txt
&
dd=odb
Each parameter has a name=value pair, and parameters are separated by ampersands (&) -
additional parameters should be appended to the end of the existing ones in the same fashion.
The parameters for the hit counter are listed below:
- display=X
- Valid Values for X: "counter", "date", "clock", or "image"
- Default value: "display=counter"
- Description: This parameter indicates the kind of counter to display. For a HIT counter, use a value of
"counter".
- df=X
- Valid Values for X: Any valid filename for count file (alphabetic, numeric, and period characters allowed)
- Default value: No default, this field is required and must be specified when "display=counter"
- Description: This parameter specifies the name of the file for storing the count value. If the file does not
exist, one will be created automatically the first time someone visits your page. Important: if you have more
than one counter on your site, each counter will need to have a unique file for storing its hit count.
- dd=X
- Valid Values for X: Any valid digit style name described in the library of digit styles.
- Default value: "dd=A"
- Description: This option specifies the style of digit image to use in rendering the counter - the shape, size,
color, and style of the number that will appear on the Web page.
- md=X
- Valid Values for X: Any valid numeric value between "1" and "10" inclusive.
- Default value: "md=6"
- Description: This parameter specifies the minimum number of digits to display. If the number is less
than the specified digits, zeroes will be added to the left. However, if the number is greater than the specified
digits, the entire number will be displayed.
- incr=X
- Valid Values for X: "Y", "1", or "T" for a true condition or "N", "0", or "F" for a false condition.
- Default value: "incr=T"
- Description: This option specifies if the count file is to be incremented when the counter is displayed. If set
as "true", the counter will register hits, if set to "false", the counter will not change.
Setting the counter to
"false" is useful in building a "monitoring" page that contains a copy of a coutner in a "live" page - the monitoring
counter will not record a "hit" when you check its value on another page, only when a visitor loads the "live" page
containing the counter.
- sh=X
- Valid Values for X: "Y", "1", or "T" for a true condition or "N", "0", or "F" for a false condition.
- Default value: "sh=T"
- Description: This option specifies if the counter digits are to be shown (displayed). By setting this value to
"false," you can make the counter "invisible" to visitors (and a visible, non-incrementing counter can access the same
data file to show the number of hits on a monitoring page).
- lit=X
- Valid Values for X: A character string containing characters of '0', '1', '2', '3', '4', '5', '6', '7', '8',
'9', ':', '-', 'a', 'p' depending on the digit style used from the library of counter digit styles.
- Default value: No literal value is displayed
- Description: This parameter allows you to specify a literal (fixed) value that the counter will always display.
For example, if you specify "lit=10000", your counter will display 10000 (regardless of
the number of hits the page actually receives).
Using this option ignores the following parameters: "md=", "sh=", "incr=", and "df=".
- ft=X
- Valid Values for X: Any valid numeric values between "0" and "255" inclusive.
- Default value: "ft=6"
- Description: This parameter specifies the thickness (in pixels) of a frame that will appear around the edges of
the counter image. Values over "5" have a 3-D effect. If you do not want to generate a frame around your counter image,
use a value of "0".
- frgb=X
- Valid Values for X: Any valid values in the "color format".
- Default value: "frgb=100;139;216"
- Description: This parameter specifies the color of the frame (see ft above) that
surrounds the counter.
- degrees=X
- Valid Values for X: "0", "90", "180", "270", or "360".
- Default value: "degrees=0" (no rotation)
- Description: This parameter allows you to rotate the counter in 90-degree increments. Values of "0" and "360"
have no effect.
- negate=X
- Valid Values for X: "Y", "1", or "T" for a true condition or "N", "0", or "F" for a false condition.
- Default value: "negate=F"
- Description: If set to "true", this parameter will cause the colors of the counter (but not the frame) to be
changed to their "opposite" value (like a photo negative).
- chcolor=X
- Valid Values for X: "Y", "1", or "T" for a true condition or "N", "0", or "F" for a false condition.
- Default value: "chcolor=F"
- Description: This option notifies the counter program to dynamically change one color in the counter (specified
using the color from the "srgb=" parameter) to a different color (specified with the "prgb=" parameter) Color changes
are applied to the image only and not to the frame.
- srgb=X
- Valid Values for X: Any valid values in the "color format".
- Default value: "srgb=0;255;0" (green)
- Description: This parameter specifies the source color in the counter that the subscriber wants to dynamically
change. If this parameter is specified, the option "chcolor=" is automatically set to "T".
- prgb=X
- Valid Values for X: Any valid values in the "color format".
- Default value: "prgb=0;255;255" (cyan)
- Description: This parameter specifies the target color to which the source color
(srgb) is to be changed. If the "prgb=" parameter is specified, the option "chcolor="
is automatically set to "T".
- trgb=X
- Valid Values for X: Any valid values in the "color format".
- Default value: No transparent color assigned and transparent color processing will not be performed.
- Description: This option specifies a transparent color to be used with the counter - pixels of the color
specified will become transparent (the page background will show through).
Color Format
Parameter values that affect the color of pixels in the counter will need to be formatted according to one of the following
standards:
- "n1;n2;n3"
- n1 = red component (integer between 0 and 255 inclusive)
- n2 = green component (integer between 0 and 255 inclusive)
- n3 = blue component (integer between 0 and 255 inclusive)
- "x1x2x3"
- x1 = red component (2 hex digits between 00 and ff inclusive)
- x2 = green component (2 hex digits between 00 and ff inclusive)
- x3 = blue component (2 hex digits between 00 and ff inclusive)
- Note: Do not use an octothorpe (#) before the hex string as is done in HTML.
- "colorname"
- Valid color name (ie. "blue", "white", "black", "green", etc. ).
|
|
|

|

|
|

|

Announcements
|
|