Privacy Policy Terms and Conditions
Account Setup
Account Utilities
Developer Information
Count.cgi
FormMail
GuestBook
SimpleCount
FAQ's
Network IP Addresses and Hostnames
Home > Support > Developer Information > SimpleCount
SimpleCount.cgi

Description:

SimpleCount.cgi is an easy to implement page counter based on a script by Kevin Meltzer. Four arguments are given to the script (after the '?' in the example above). The arguments are separated by the '&' character.

The first argument is the name of the data file containing the number of hits the page has received. If you're maintaining a counter only for one page (your main page for instance) then it is sufficient to use "count.dat" as the data file name. If you'd like to maintain a separate counter for various pages, then each page should have a unique data file name.

All data files are stored in the "~/public_html/CGI_Data/SimpleCount/" directory.

The second argument is the number of digits to display. You may select any number between 1 and 12 inclusive. If you select a number of digits that is fewer than is needed (ie. you select 2 digits, but have 100 or more hits), then the script will display only the number of digits required to output the number. If you select more than the required numbers, the output will be padded with zeros to the left of the number (ie. "00112").

The third argument controls whether or not there is padding above and below the digits. If the argument is "0" (zero) then the digit will be 10 pixels high by 8 pixels wide with no padding. If the argument is "1" then the digit will be 10 pixels high by 8 pixels wide with an additional 3 pixels of empty space above and below the digits. This is handy if you wish to place the counter in a bordered table and you don't wish the digits to be pressed right up against the border.

The fourth and final arument controls whether or not the digits are inversed. If the argument is a '0' (zero) then the digits will be black on a white background. If the arguemnt is a '1' then the digits will be white on a black background.


Silicon Valley Web Hosting | Dedicated Web Hosting | Virtual Dedicated Hosting | Fully Manged Hosting | Premium Services | San Jose Colocation | Adult Web Hosting | Support | About Us | Contact Us