RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Hit counter

Join Date: Jul 2006
Location: Deptford, London
Posts: 986
Reputation: MattEvans has a spectacular aura about MattEvans has a spectacular aura about MattEvans has a spectacular aura about 
Rep Power: 6
Solved Threads: 52
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is online now Online
Posting Shark

Re: Hit counter

  #3  
Jun 21st, 2007
...if you want to write a hitcounter that records hits from any and all users; you cannot use Javascript - it can't write data to anywhere except cookies, which are unique to each user's browser.

so, you'll have to use some serverside application/script/method to record data permanantly at your server.

PHP: http://www.developingwebs.net/phpclass/hitcounter.php

Perl/SHTML:http://www.akamarketing.com/simple-h...with-perl.html

C++: http://www.daniweb.com/code/snippet596.html

ASB (with VBScript): http://www.webwizguide.com/asp/tutor...r_tutorial.asp

etc..

The key is, these are programs that run at the server, Javascript in a browser is a client program. Javscript when used as an ASP scripting language is serverside, but the details of making a hitcounter using that would be more of an ASP question than a Javscript question.

You can use AJAX browser Javascript to talk to server programs, but the server program has to be there to record permanent non user-bound data, and infact, any kind of permanent data that you yourself can read..
Last edited by MattEvans : Jun 21st, 2007 at 1:06 pm.
Plato forgot the nullahedron..
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:11 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC