[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Hit Counter not working

Posted on 2007-07-27
9
Medium Priority
?
305 Views
Last Modified: 2013-12-07
I have been using a hit counter for a few years on a particular site.  its maintained by a third party.

All of a sudden it doesnt seem to be working it shoudl be at 10,443 - it was working up until 9,000.

I have tried to contact Stats Machine without success - is this something within my code?  

If this is a problem at their end does anyone have an alternative solution whereby I can start the code at what should be the current count?  Preferably free or a tutorial.

Thanks.

I would be grateful for some assistance.  Here is the code:
In the head:
<script src="http://www.statsmachine.com/cgi-bin/counter.cgi?558|55838" type="text/JavaScript"></script>

In the body:
<a href="http://www.statsmachine.com/"><script type="text/javascript"><!--
mycount = mycount + 1;
var ooooooo = Math.floor((mycount)/1000000);
mycount = (mycount-(ooooooo*1000000));
var oooooo = Math.floor((mycount)/100000);
mycount = (mycount-(oooooo*100000));
var ooooo = Math.floor((mycount)/10000);
mycount = (mycount-(ooooo*10000));
var oooo = Math.floor((mycount)/1000);
mycount = (mycount-(oooo*1000));
var ooo = Math.floor((mycount)/100);
mycount = (mycount-(ooo*100));
var oo = Math.floor((mycount)/10);
mycount = (mycount-(oo*10));
var o = mycount;
document.write("<img border=0 src=" + ooooooo + ".gif><img border=0 src=" + oooooo + ".gif><img border=0 src=" + ooooo + ".gif><img border=0 src=" + oooo + ".gif><img border=0 src=" + ooo + ".gif><img border=0 src=" + oo + ".gif><img border=0 src=" + o + ".gif>");
// --></script>
0
Comment
Question by:NorthDorsetWeb
  • 5
  • 4
9 Comments
 
LVL 63

Expert Comment

by:Zvonko
ID: 19584182
This proves that your digit split works and that counter is failing:

<script>

mycount = 10443;
var ooooooo = Math.floor((mycount)/1000000);
mycount = (mycount-(ooooooo*1000000));
var oooooo = Math.floor((mycount)/100000);
mycount = (mycount-(oooooo*100000));
var ooooo = Math.floor((mycount)/10000);
mycount = (mycount-(ooooo*10000));
var oooo = Math.floor((mycount)/1000);
mycount = (mycount-(oooo*1000));
var ooo = Math.floor((mycount)/100);
mycount = (mycount-(ooo*100));
var oo = Math.floor((mycount)/10);
mycount = (mycount-(oo*10));
var o = mycount;
document.write(ooooooo + "  " +oooooo + "  " +ooooo + "  " +oooo + "  " +ooo + "  " +oo + "  " +o );
// -->
</script>


By the way, I see the counter at the moment at: 446

0
 

Author Comment

by:NorthDorsetWeb
ID: 19584304
Hi there thanks for your response.  So unless I manage to get hold of them then theres little i can do.

Can you offer an alternative solution?

Many thanks
Emma
0
 
LVL 63

Accepted Solution

by:
Zvonko earned 2000 total points
ID: 19586169
Instead of adding 1 you can add any number you like and count from there.

mycount = mycount + 10443 ;

0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:NorthDorsetWeb
ID: 19588110
Brilliant - that's done the trick.

For future reference, and it doesnt appear that the statsmachine.com provides the same service anymore, do you know of any good third party counters?  That are free - or can you create them by writing script yourself?  
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 19591131
I do not use any free counters and I cannot imagine one doing it in JavaScript.
But it is easy to write one on web server side. Do you have PHP or ASP on server side?
0
 

Author Comment

by:NorthDorsetWeb
ID: 19598790
We have asp
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 19600434
0
 

Author Comment

by:NorthDorsetWeb
ID: 19604088
Thanks for all of your help.  Kind regards emma
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 19604717
You are welcome.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses
Course of the Month17 days, 22 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question