Hit counter wanted, code please
#1
Scooby Regular
Thread Starter
Join Date: Jul 2002
Location: Under your bonnet
Posts: 9,173
Likes: 0
Received 0 Likes
on
0 Posts
Being a bit of a **** wit when it comes to html and the like
any of you know of a simple code that I can put up in my webspace to make a hit counter, I've tried a search for "hit counters" but all I come up with is stuff I have to sign up for and the counter includes stats and a load of other bollox I don't want
so just a simple code would be nice
Cheers
Andy
any of you know of a simple code that I can put up in my webspace to make a hit counter, I've tried a search for "hit counters" but all I come up with is stuff I have to sign up for and the counter includes stats and a load of other bollox I don't want
so just a simple code would be nice
Cheers
Andy
#3
Scooby Regular
Thread Starter
Join Date: Jul 2002
Location: Under your bonnet
Posts: 9,173
Likes: 0
Received 0 Likes
on
0 Posts
is your server runner perl?
It's clara net that I use as my isp ?????
Andy
<note the use of "fcukwit when it comes to html">
EDIT :I re-read your post Christian ! all i want is a little counter on my site that clicks up one as each person looks at it. that's all, no frills, no going to URL's to check up etc....
[Edited by Fuzz - 11/12/2002 10:56:58 PM]
[Edited by Fuzz - 11/12/2002 10:57:51 PM]
#4
you could try this:
<SCRIPT language=JAVASCRIPT type=TEXT/JAVASCRIPT>
<!-- By David Hyman -->
<!-- Hide script from older browsers
expireDate = new Date
expireDate.setMonth(expireDate.getMonth()+6)
hitCt = eval(cookieVal("pageHit"))
hitCt++
document.cookie = "pageHit="+hitCt+";expires=" + expireDate.toGMTString()
function cookieVal(cookieName) {
thisCookie = document.cookie.split("; ")
for (i=0; i<thisCookie.length; i++) {
if (cookieName == thisCookie[i].split("=")[0]) {
return thisCookie.split("=")[1]
}
}
return 0
}
// End hiding script -->
Palce this segment in html where you want the counter to be:
<SCRIPT language=JAVASCRIPT type=TEXT/JAVASCRIPT>
<!-- Hide script from older browsers
document.write("You have visited this page " + hitCt + " times.")
// End hiding script -->
</SCRIPT>
I found it here: http://www.getsite.com/ScriptLibrary/JavaScripts/JavascriptCounter/JavascriptCounter.htm
- Jon
<SCRIPT language=JAVASCRIPT type=TEXT/JAVASCRIPT>
<!-- By David Hyman -->
<!-- Hide script from older browsers
expireDate = new Date
expireDate.setMonth(expireDate.getMonth()+6)
hitCt = eval(cookieVal("pageHit"))
hitCt++
document.cookie = "pageHit="+hitCt+";expires=" + expireDate.toGMTString()
function cookieVal(cookieName) {
thisCookie = document.cookie.split("; ")
for (i=0; i<thisCookie.length; i++) {
if (cookieName == thisCookie[i].split("=")[0]) {
return thisCookie.split("=")[1]
}
}
return 0
}
// End hiding script -->
Palce this segment in html where you want the counter to be:
<SCRIPT language=JAVASCRIPT type=TEXT/JAVASCRIPT>
<!-- Hide script from older browsers
document.write("You have visited this page " + hitCt + " times.")
// End hiding script -->
</SCRIPT>
I found it here: http://www.getsite.com/ScriptLibrary/JavaScripts/JavascriptCounter/JavascriptCounter.htm
- Jon
Thread
Thread Starter
Forum
Replies
Last Post
oilman
Trader Announcements
15
01 October 2015 11:55 AM