Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to include a hit counter?

 
lokesh reddy
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any one tell me,
how to include hit counter in an html file, with out using jsp or ssi(server side includes).
 
Mirko Froehlich
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use an image tag, and dynamically generate the image. There are also websites that offer free image-based counters. I don't have a URL handy right now, but I am sure you will find some if you search the web.
-Mirko

Originally posted by lokesh reddy:
Can any one tell me,
how to include hit counter in an html file, with out using jsp or ssi(server side includes).

 
Ajan Balakrishnan
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use a freebie from www.mycomputer.com. Just register once for a free counter and place some code like the following between the BODY tag in your html file. The only change in the code will be where i marked XXX. It will your registration userid. They will get you the code like the one below after the registration.
http://counter.mycomputer.com -->
<a href="http://counter.mycomputer.com/"><img alt="Counter"
src="http://counter.mycomputer.com/c.count?XXX&c=1" border=0></a>
<!-- End of Counter Code -->
I think there are lot of other free counters (beseen.com, freecounter.com) available in the internet. Check it out . One ugly thing with the free counters are it comes a logo of their
website.
If you are using JSP's it is posssible to use your application object take of the the counting operation. I can send you the code if you want one
Ajan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic