I have code for a visible page counter. I'd like to be able to create a invisible page counter that the public cannot see on the home page. Then I'd like to be able to add an administrative password protected web page that will allow me to see the page counter for the home page. Could someone please help me to write the code for two different web pages (1. Invisible page counter for the home page 2. Visible page counter for me to view in an admin area).
Here's the code that I have for a page counter that people can see:\
<%
Dim strPath, File, file2, x,liCount, j ,resfile, d, i ,fl
strPath = "D:\inetpub\wwwroot\mywebsite.com\database\counter.txt"
Set File = Server.CreateObject("Scripting.FileSystemObject")
set file2=File.OpenTextFile(strPath)
x=file2.readline
set resfile = File.createTextFile (strPath)
resfile.writeline(x+1)
liCount=Cstr(x+1)
j = Len(liCount)
d=6 - j
%>
<%
For i=1 to d step 1
Response.Write ("<IMG SRC='DG0.gif'>")
Next
For i=1 to j step 1
fl="DG" + Mid(liCount, i , 1) + ".gif"
Response.Write ("<IMG SRC=") & (fl) & ">"
Next
%>
<B><font=ARIAL size="22">Visitors
since May 18, 2003.</FONT></B>
<%
%>