% ' Declare our variables Dim objFSO, objCountFile ' object vars for FSO and File Dim strCountFileName ' filename of count text file Dim iCount ' count variable Dim bUseImages ' boolean whether or not to use images Dim I ' standard looping var ' Determine whether we use images or plain text ' You could just set this to True or False instead 'bUseImages = CBool(Request.QueryString("images")) ' Compute our count file's filename ' This is based on the file from which you call count.asp ' It basically takes that name and appends a .cnt so I don't ' accidently overwrite any files. If for some reason you have ' a file named script_name.asp.cnt then change this or watch out! 'Set objFSO = Server.CreateObject("Scripting.FileSystemObject") 'Open the text file 'Dim objTextStream, filesys 'Set filesys= CreateObject("Scripting.FileSystemObject") 'If filesys.FileExists(Server.MapPath("counter.txt")) Then 'Set objTextStream = objFSO.OpenTextFile(Server.MapPath("counter.txt"), 8, True) 'else 'Set objTextStream = objFSO.OpenTextFile(Server.MapPath("counter.txt"), 2, True) 'objTextStream.WriteLine "0" 'end if 'Dim Filepath 'Filepath = Server.MapPath("counter.txt") 'Dim file 'set file = filesys.GetFile(Filepath) 'Dim TextStream 'Set TextStream = file.OpenAsTextStream(1, -2) 'Dim Line 'Do While Not TextStream.AtEndOfStream ' Line = TextStream.readline 'Loop 'iCount=CInt(Line) 'iCount=iCount+1 'objTextStream.WriteLine iCount 'objTextStream.Close 'Set objTextStream = Nothing 'Set objFSO = Nothing 'set filesys = nothing 'dim userip, prevaddy 'userip = Request.ServerVariables("REMOTE_ADDR") 'prevaddy = Request.ServerVariables("HTTP_REFERER") 'Set objFSO = Server.CreateObject("Scripting.FileSystemObject") 'Set filesys= CreateObject("Scripting.FileSystemObject") 'If filesys.FileExists(Server.MapPath("info.txt")) Then 'Set objTextStream = objFSO.OpenTextFile(Server.MapPath("info.txt"), 8, True) 'else 'Set objTextStream = objFSO.OpenTextFile(Server.MapPath("info.txt"), 2, True) 'end if 'Display the contents of the text file 'objTextStream.WriteLine userip&" "&prevaddy %>
<% '****************************************************************************** '*** Change title here if needed and the keywords and descriptions if needed*** '****************************************************************************** %>
|
|||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||
|
©2009 AMC Technology, L.L.C. All rights reserved |
|||||||||||||||||||||||||||||||||||||||