Check Domain Name


ASP Script for Hit Counter

The following is the Sample Script Code for Hit Counter :
Paste the code given below in default.asp or index.asp file of your web page.

Create a folder titled "Counter" and a text file "counter.txt".

 

<%

'MAKE SURE THAT THE FILE EXISXTS INITIALLY

path = Request.ServerVariables("APPL_PHYSICAL_PATH")

path = path&"\counter\counter.txt"

Set File = Server.CreateObject("Scripting.FileSystemObject")

set file2=file.OpenTextFile(path)

x=file2.readline

Response.Write(x)'This writes the count

set resfile = File.createTextFile (path)

resfile.writeline(x+1)

%>

Visit Indian SEO for Search Engine Optimization Website
Maintenance Services Bangalore India
Visit indianattire.com for Indian attire
Copy Right 2001 - 2005 All Rights Reserved Terms and Conditions