Copyright © RDSIndia.com,
All Rights Reserved
RDS SUPPORTHOMESERVER BASICSCONFIGURING FTP

RDS SUPPORTCONFIGURING E-MAILSTRANSFERRING DATABASETRANSFER TO RDS SERVERDOMAIN STATISTICSPOST YOUR QUERYSAMPLE SCRIPTS

Sample Scripts - 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".


Sample Code

 <%

 '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)

 %>