Forum Moderators: open
[edited by: engine at 8:12 am (utc) on May 30, 2009]
[edit reason] See TOS [/edit]
Hope that helps as we have some real experts in the ASP community.
< admin note: the thread is now moved >
[edited by: tedster at 1:35 am (utc) on May 31, 2009]
Set ThisFile = StreamF.OpenTextFile (CountFile, 1, False)
Countly = 0
do while not ThisFile.AtEndOfStream
Thisline = ThisFile.readline
'Preserve the use of keywords, can only be adjusted on the final dimension of the array size, and can not change the dimension of the array.
'Only one-dimensional array, the Victoria is the last and only one-dimensional, you can modify the size of the array.
Redim preserve ly (Countly)
ly (Countly) = Thisline
'Countly documented that the number of rows ThisFile
Countly = Countly + 1
loop
ThisFile.Close
2: the beginning of the current page to refresh IP address access
sj in keeping the current system time
sameip = 0
for i = 1 to (Countly-1) / 2
'Access to even out
'If statistics online just now and the current IP address for more than a minute, then on from the IP
if DateDiff ( "s", ly (i * 2), sj)> 60 then
ly (i * 2-1) = ""
ly (i * 2) = ""
Countly = Countly-2
end if
'Just now, online access to the IP address, if it is online
'Request.ServerVariables ( "REMOTE_ADDR") issued a request for access to the machine IP
if Request.ServerVariables ( "REMOTE_ADDR") = ly (i * 2-1) then
sameip = 1
ly (i * 2) = sj
end if
next
3: access to the latest IP address of the current page into the People.asp
'Began to write the document data People.asp
set OutFile = StreamF.CreateTextFile (CountFile)
for i = 0 to Countly-1
if ly (i )<>"" then
outFile.WriteLine ly (i)
end if
next
if sameip = 0 then
outFile.WriteLine Request.ServerVariables ( "REMOTE_ADDR")
outFile.WriteLine sj
outFile.Close
end if