How to set up a counter?


#1

I’ve put in the code for a built-in counter, and changed the .dat file name to a random one (“mycounter.dat”), but it still doesn’t work. It may be because the DNS is still propagating (I just created the site), but is there any step I’m missing?


#2

It may very well be DNS, and when you say “it still doesn’t work”, are you talking about your site in general, or just the counter.

Not knowing what steps you took, I can’t guess whether or not you missed any steps.

Sharing the url of your site with us would help us help you :wink:

–rlparker


#3

I submitted a support ticket a few weeks ago about a problem with counter. I do, or did not, think that the counter data files are/were being written to by the web server. I did not get a reply so I will try again. There were other pushing matters for support at the time so I did not pursue it then.


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK!! :@

You act on my advice at your own risk!


#4

I thought I would do a quick check first before bothering support and it would appear that the data files are being written to okay.

For Aristo …

This is a working counter line:-

<img src=“http://counter.dreamhost.com/cgi-bin/Count.cgi?df=username-count1.dat&st=1234&pad=F&ft=0&dd=A&istrip=T&comma=T&trgb=000000&prgb=ff0000” align=absmiddle" width=100 height=25>

The datafile df needs to be replaced by your own unique filename. The &st=1234 is entered once into your HTML file to seed the counter to start at 1234. Once you have viewed the page you should delete the &st=1234 bit so that the whole line (you could start with this to have a counter start at zero) would then be:-

<img src=“http://counter.dreamhost.com/cgi-bin/Count.cgi?df=username-count1.dat&pad=F&ft=0&dd=A&istrip=T&comma=T&trgb=000000&prgb=ff0000” align=absmiddle" width=100 height=25>

If when you view the page you see the counter number okay do not forget that the counter will not always increment each time you view the page since it needs to be viewed from a unique IP. What I did was to view the test page via anonymouser to use different IP address.

Presumably you are able to view the rest of your page okay which would indicate the DNS has propagated.

As an aside you may be told that using counters on a web page is not ‘fashionable’. However if you want a counter then that is all that matters. Tell them you are just complying with the local laws that now require websites to have counters and quote EU regulation 1569.78. :wink:


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK!! :@

You act on my advice at your own risk!


#5

Thanks very much for the help. The counter appears to be working, but it is at 1234. I’d like it to start at 1. Is there a way to do this? I tried saying &st=0 or &st=1 but it doesn’t like those numbers, for some reason. Not putting anything doesn’t work, either.

EDIT: I see the problem - setting the width at 100 made it look scewed when only the number 1 showed up. I’ll have to see how I can fix that…

EDIT2: Cool! It works. Taking the width and height parameters out completely worked for me.


#6

This link is the official home of the counter program and gives all the settings you can use.


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK!! :@

You act on my advice at your own risk!