Tom's Guide | Tom's Hardware | Tom's Games | PC Safety Suite
![]() |
![]() |
![]() |
Comment:
I am looking for some help. Please do not tell me to go searching because I have spent hours and hours. I need some actual sites from people.
I am looking for a downloadable and FREE web page hit counter. Not one that is maintained by another server, or copying in some Java script. One that I can download and install and my hit information does not get sent to anyone. It is maintained only by me.
I make my pages using FrontPage and use IIS v5 to host them. FP does have its own counter but it does not work in another web server I plan to move over from IIS.
No PHP or MySQL stuff. I do not know any of that. Some Java, okay. HTML code is great.
Thank you.
+1 | ![]() |
Okay, when I said "some Java" I meant was the counter itself. Not adding in a Java code for another site to control and track.
+1 | ![]() |
Actually, let us try to skip Java all together since it never works on my PC and it may not on someone else's when they load the web page.
Let us try to stick to HTML coding if possible. If not, then Java.
Thanks.
+1 | ![]() |
As I said in your other post, you don't understand the technology. This is impossible with only javascript and HTML.
Hit counters are lame anyways...Just use a log analyzer to get this info for yourself and don't share it with your users.
-SN
+1 | ![]() |
Thanks for the education on your other posting. I do not know anything about any type of programming. That is why I ask questions like these. How else will I get my answers or learn?
Nothing wrong with asking for other users opinions and help, right?
Thanks again for the info on he other post. I keep it in mind.
+1 | ![]() |
Try this.
This is I was copied from others-- not take credit from it.
Showing area:
This is your 1 time visit this siteCopy the following Java Script and paste to <HEAD> and </HEAD>
//////////////////////////////////////////////
<script language="JavaScript">
/////////////
//
// Cookie Functions - Bill Dortch (21-Jan-96)
// The following functions are released to the
// public domain.
//
function GookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function Gookie(name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return GookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return null;
}
function Sookie(name, value) {
var argv = Sookie.arguments;
var argc = Sookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires="
+ expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function Dookie(name) {
var exp = new Date();
exp.setTime (exp.getTime() - 1);
var cval = Gookie (name);
document.cookie = name + "=" + cval + "; expires="
+ exp.toGMTString();
}
//
// End of cookie functions
//////////
</script>
<script>
var expdate = new Date();
// set to one year
expdate.setTime(expdate.getTime() + (24 * 60 * 60 * 1000 * 365));
if(!(visits = Gookie("3wave"))) {visits = 1;
Sookie("3wave", visits, expdate, "/", null, false);
document.write("這是您第 " + visits + " 次光臨本站!");}
else{// add up visiting times
visits++;
Sookie("3wave", visits, expdate, "/", null, false);
document.write("This is your " + visits + " visit this Web site!");
}
</script>
+1 | ![]() |
Sorry, ther are some chinese word there, you may not able to read.
document.write("這是您第 " + visits + " 次光臨本站!");}
should be:
document.write("This is your " + visits + " times visit this !");}you may change the word as you like.
+1 | ![]() |
Note that the javascript above isn't a typical hit counter (as I said, that's impossible with just html and javascript.) What it does is use a cookie to record how many times a particular user has visited your site...Not the total number of visitors.
-SN
+1 | ![]() |
document.write("This is your " + visits + " times visit this site!");}
or may be
document.write("You are the " + visits + " visited this site!");}I was tried and it's works! but not sure yet it's record individual visit or total counter.
play with it and change the wording you like.
+1 | ![]() |
I am not good at Java script.
Can you modify it to add all visits together no matter which user log on?
+1 | ![]() |
No. Because, as I said, that is impossible with HTML and javascript. Why? Because javascript is not able to write files to the server, where that information needs to be kept. Javascript is allowed to do very limited writing to the client computer, in the form of cookies.
The javascript above just sends a cookie to the client machine indicating that particular machine has visited x number of times. But there's no way to modify it to know how many total users there are, because javascript is not capable of storing that information anywhere.
You need something server-side, like PHP.
-SN
![]() |
How to embed streaming mp...
|
FREE Chat for Site?
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.