Numero visite dal 1
luglio 2004:
<%
fp = Server.MapPath("aspcount.txt")
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.OpenTextFile(fp,1,True)
ct = Clng(a.ReadLine)
if Session("ct") = "" then
Session("ct") = ct
ct = ct + 1
a.close
Set a = fs.CreateTextFile(fp, True)
a.WriteLine(ct)
end if
a.Close
fp = Server.MapPath("visitors.txt")
Set a = fs.OpenTextFile(fp,8,True)
a.WriteLine(Request.ServerVariables("REMOTE_ADDR") )
a.WriteLine(Request.ServerVariables("REMOTE_USER") )
a.WriteLine(Request.ServerVariables("REMOTE_HOST") )
a.WriteLine(Request.ServerVariables("HTTP_USER_AGENT") )
a.WriteLine(Request.ServerVariables("HTTP_REFERER") )
a.WriteLine("==========================================================================" )
a.close
Response.Write ct
%>
|