Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Hit counter wanted, code please

Thread Tools
 
Search this Thread
 
Old 12 November 2002, 10:47 PM
  #1  
Fuzz
Scooby Regular
Thread Starter
 
Fuzz's Avatar
 
Join Date: Jul 2002
Location: Under your bonnet
Posts: 9,173
Likes: 0
Received 0 Likes on 0 Posts
Post

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
Old 12 November 2002, 10:49 PM
  #2  
ChristianR
Scooby Regular
iTrader: (1)
 
ChristianR's Avatar
 
Join Date: May 2001
Location: Europe
Posts: 6,329
Likes: 0
Received 1 Like on 1 Post
Post

is your server runner perl? I have a nice little script that you run behind the scenes, and basically u go to a specific url and it tells you how many hits u have had
Old 12 November 2002, 10:54 PM
  #3  
Fuzz
Scooby Regular
Thread Starter
 
Fuzz's Avatar
 
Join Date: Jul 2002
Location: Under your bonnet
Posts: 9,173
Likes: 0
Received 0 Likes on 0 Posts
Post

is your server runner perl?
Have not got the foggiest idea

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]
Old 13 November 2002, 09:41 AM
  #4  
scoob_dood
Scooby Regular
 
scoob_dood's Avatar
 
Join Date: Jan 2002
Location: London
Posts: 550
Likes: 0
Received 0 Likes on 0 Posts
Post

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
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
s_tubb23
General Technical
4
14 October 2015 07:58 PM
oilman
Trader Announcements
15
01 October 2015 11:55 AM
scottydouk
Wanted
2
28 September 2015 08:26 PM
Littleted
Computer & Technology Related
42
26 September 2015 09:48 AM
markr1963
Computer & Technology Related
21
23 September 2015 12:07 PM



Quick Reply: Hit counter wanted, code please



All times are GMT +1. The time now is 12:00 PM.