Asp Codes
ActiveX
ADO
Array
Code Snippets
Components
Data Access
Date Time
Files
Graphics
HTML Formatting
Mathematics
Miscellaneous
Sessions
SQL
Strings
Techniques
XML
Asp > Sessions sample source codes
Home made hit counter
Home made hit counter <% Set FS=Server.CreateObject("Scripting.FileSystemObject") Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"), 1, False) fcount=RS.ReadLine RS.Close fcount=fcount+1 'This code is disabled due to the write access security on our server: 'Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"), 2, False) 'RS.Write fcount 'RS.Close Set RS=Nothing Set FS=Nothing %> <html> <body> <p> This page has been visited <%=fcount%> times. </p> </body> </html>
Privacy Policy
|
Link to Us
|
Links