Rated
Read 43,347 times
Contents
Related Categories
ASP Web Counter - Introduction
Introduction
If you're tired of free web counter services that just make you copy and paste the code for an image of some numbers into your web site, this article is for you. It will explain in easy steps how you can create a professional, and invisible, web counter. The numbers appear as normal text, no more ugly looking pictures! You will also learn how to use a cookie, ensuring that the same visitor isn't counted twice in, say, 2 hours, as well as a cookie so that you can visit your own site without distorting statistics.
Step 1: Create the file for the number to be stored in.
This counter works by storing a number in a text file, then reading or updating it accordingly. So, create a text file called "counter.txt" somewhere on your web server. Make sure the file isn't read only (you'll probably have to email your provider and ask them to grant it write access.) Put the value "0" [zero] in the text file, with no spaces before or after it.
Paul has been a keen web developer since the age of 11, creating a variety of web sites over the years, which gradually increased in quality as well as complexity as he learned and became familiar with various web-based technologies on the way. He now has extensive experience of PHP, MySQL, XHTML, CSS, DHTML, JavaScript, Flash, ActionScript and Active Server Pages. During his school years, he quickly became known amongst friends as "the one who can fix computers", a reputation which earned him a year-long post working for the Computing Services Department at the University of Liverpool, where he is currently studying for a degree in Modern European Languages.
Paul's experience of web site/application design and management, along with his all-round computer software/hardware expertise led him to found his business - caeus.com (see below) - which currently employs three other staff-members, offering web site design, technical support services and data recovery, among other services.
Paul is a Christian and also a keen musician - in his spare time he plays the drums both at his church and in various bands and other music groups, as well as working as an Administrator on this web site. Paul tries not to sound too pretentious whilst writing about himself in the third person.
 (New web site currently under construction - contact me for a preview!)
Comments
-
Posted by csifrancais on 16 Dec 2003
How can I put all the code into the webpage? -
Posted by Ashlye on 29 Sep 2003
This script is using VBScript.
Posted by DjJazzy on 11 Dec 2002
Thanks for your help Paul. I've sent NTL an E-Mail about permissions and the <% tags. I'll let you know how it goes and if I've got any more problems.
Cheers for now,
Mark.
Posted by paulfp on 11 Dec 2002
you'll need to email ntl and ask them to change the permissions for you.
they (probably) only allow themselves to change them, cos then it's more secure and less prone to hacking.
the counter.tx...
Posted by DjJazzy on 11 Dec 2002
Hi,
I run my pages by uploading them to my Remote Server, then I use Internet Explorer to visit the page, example - http://homepage.ntlworld.com/mfj/......... and then the ASP page.
I can execute co...
|