Contact Site map Home

Technical Support
(Historical information only. We hope you find it to be a beneficial resource)

How Do I Get That Cool New Counter On My Page?

A Note for clients who use FrontPage :

This new counter will work fine in a FrontPage designed web site but you will not use FrontPage to create it or publish it because the procedure requires you to FTP to your web site and the true root directory of your site ( the directory above your web content directory). That true path on our server and in the remote address bar of an FTP application will look like this :


If FTPing and telnet sessions to your website and the following procedures are more than you want to tackle, you can still use FrontPage to design and create a FrontPage based counter.

Here's what's involved:

You will create 1 new file called .counter and place it in your root directory at  /mnt/web/guide/yourdomainnameprefix/

You will edit 1 existing file in that same directory called .htaccess

You will edit the html code of your home page, usually named index.html, index.htm. home.html or home.htm.

You'll need telnet enabled for your web site and a working knowledge of basic telnet and FTP skills.

The files that you create and edit should be edited in the simplest text editors available to you in your ftp application or on your computer. You should use Notepad in Windows. The file that you create should be transferred in ASCII mode, with no invisible control characters. 

The new file that you create, .counter, should be owned by your username with permissions set at 666 to work properly. If your FTP application won't do this for you then you will need telnet access enabled for your web site and you will need to follow the telnet FAQ's regarding telnet commands for setting these file properties. The .counter file that you create will be empty when you create it and install it. It acts as the count log and records the current count in binary form as web daemon writes to it with each hit.

To change permissions on the .counter file with telnet, at the command line type the following and hit enter

chmod 666 .counter                             To change ownership at the command line type the following and hit enter

chown XXXX  .counter    where you would substitute your username for the big X placeholder.

To setup a new counter for a new page, now type -c/index.html             (or the name of your home page if not named index.html)   and hit enter

Step 1

In a simple text editor create and ftp to your root directory a file named .counter, use your ftp application or login with telnet to check the permissions and ownership of the file on the server. Adjust them so the file is owned by your username with permissions set at 666 if that is necessary.

Step 2

Using your FTP application, open the file in that same directory named .htaccess or ftp a copy of that file to your local hard drive and open it in a simple text editor. Scroll down inside the file till you find room or hit the return key to generate some line spaces among the lines you will already find there.

Add this simple line of text, substituting your domain name prefix where it says that in the syntax , justified all the way to the left.

Counterfile     /mnt/web/guide/yourdomainnameprefix/.counter

Save the results back to the server or save the results to your local hard drive and then FTP the new version of  your .htaccess file to the server in ASCII mode. 

Step 3

Find your home page, whatever the name, and open that up in a simple text editor. If you have a counter previously installed and you want to make an outright substitution search for the counterURL that begins with 

<img scr=  

Our old counter looked like this:

<img src=" count2?width=5&amp;link=">

And you usually find it nestled amongst code that looks like:

<p align="center">Sample Counter: img src=" count2?width=5&amp;link=">

After the  =  substitute the newURL so the html code looks like:

 <img src="/server-cntr?face=default">

Save the results back or save and FTP the new version back to the server with correct ownership and permissions.

 If your installing a counter for the first time on this page just select the spot where you want it making sure that the html code doesn't get converted by an html generator like FrontPage uses.

You may also install this bit of html code on any web page in any subdirectory and it will count hits on that page for you.

Step 4

Pull up your index page and every time you click refresh you should see the counter advance. If it doesn't seem to work right the first time check your ownership and permissions of the new file called .counter. Check the line of script you added to .htaccess to make sure you remembered to substitute your domaniname prefix in the line of text. Make sure the html text was added so the text appears  identical to the above when you are viewing the source code. 

Resetting the count:

From the command line of a telnet session (using either a telnet client like that available in Windows or your FTP program if it has telnet capability ) type the command: -s/index.html            (or the name of your home page if not named index.html)   and hit enter

To setup a new counter for a new page, type -c/index.html             (or the name of your home page if not named index.html)   and hit enter

You should type this command in your root directory, the path displayed will resemble   /mnt/web/guide/yourdomainnameprefix
You will have had to have telnet access enabled for your web site first before you try this. 

You will be prompted for a count number, enter the amount, up to 10 digits and hit enter.

Refresh your page and the new count should be displayed.

Modifying the counter display:

We have provided aCGI script on each server that will display the html code with examples of different fonts, etc...that you may use to cut and paste on your page.


When you find a style you like just substitute the available html code on your index page.

Top of Page

[ Home ]   [ About ]   [ Plans ]   [ Designs ]   [ Graphics ]   [ Marketing ]   [ Hosting ]   [ Portfolio ]   [ Contact ]   [ Site Map ]
Copyright © 1995-2000 XyNexT Internet Strategies - All Rights Reserved Worldwide