Computing.Net > Forums > Web Development > FREE Hit Counter

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

FREE Hit Counter

Reply to Message Icon

Name: CPU13
Date: January 11, 2005 at 19:26:43 Pacific
OS: Windows XP Pro SP2
CPU/Ram: 700Mgz PII/300+ SDRAM
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.




Response Number 1
Name: CPU13
Date: January 11, 2005 at 19:32:09 Pacific
+1
Reply:

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.



Response Number 2
Name: CPU13
Date: January 11, 2005 at 20:30:34 Pacific
+1
Reply:

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.



Response Number 3
Name: SN
Date: January 12, 2005 at 06:14:46 Pacific
+1
Reply:

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



Response Number 4
Name: CPU13
Date: January 12, 2005 at 13:18:13 Pacific
+1
Reply:

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.



Response Number 5
Name: jds
Date: January 14, 2005 at 10:08:17 Pacific
+1
Reply:

Try this.
This is I was copied from others-- not take credit from it.
Showing area:
This is your 1 time visit this site

Copy 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>





Related Posts

See More



Response Number 6
Name: jds
Date: January 14, 2005 at 10:12:37 Pacific
+1
Reply:

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.



Response Number 7
Name: SN
Date: January 14, 2005 at 10:20:56 Pacific
+1
Reply:

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



Response Number 8
Name: jds
Date: January 14, 2005 at 10:26:10 Pacific
+1
Reply:

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.



Response Number 9
Name: jds
Date: January 14, 2005 at 10:38:52 Pacific
+1
Reply:

I am not good at Java script.
Can you modify it to add all visits together no matter which user log on?



Response Number 10
Name: SN
Date: January 14, 2005 at 11:59:24 Pacific
+1
Reply:

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



Response Number 11
Name: NarrowPathPilgrim
Date: January 15, 2005 at 22:43:35 Pacific
+1
Reply:

can I use .htaccess to make a hit logger?



Reply to Message Icon

How to embed streaming mp... FREE Chat for Site?



Post Locked

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


Go to Web Development Forum Home


Google Ads



Results for: FREE Hit Counter

Help! Quick! I need a Hit-Counter.. www.computing.net/answers/webdevel/help-quick-i-need-a-hitcounter/808.html

Need Simple Hit Counter www.computing.net/answers/webdevel/need-simple-hit-counter/1302.html

Web/Hit Counter www.computing.net/answers/webdevel/webhit-counter/2607.html