IP Address | web | show | online | number
Features: Displays the current number of online Web pages and IP addresses.
Methods: The current Web page online IP address into the people.asp, every one-minute automatic refresh, used to calculate the current page number of online and IP address.
1: The current online IP address and access time into the LY array.
Set Thisfile=streamf.opentextfile (Countfile,1,false)
Countly=0
Do as not Thisfile.atendofstream
Thisline = Thisfile.readline
' Using the Preserve keyword, you can only resize the last dimension of the array, and you cannot change the dimension of the array.
' The array has only one dimension, and the dimension is the last and only one, you can modify the size of the array.
Redim Preserve ly (countly)
Ly (countly) = Thisline
' Countly records the number of thisfile lines
countly = countly + 1
Loop
Thisfile.close
2: Start refreshing access to the current page IP address
Current system time stored in   SJ
sameip=0
for i=1 to (Countly-1)/2
' Get even sequence
' If the online IP address and current time in the statistics just now exceed one minute, then the IP
if DateDiff ("s", Ly (I*2), SJ) >60 then
ly (i*2-1) = ""
ly (i*2) = ""
countly=countly-2
end if
' Get the IP address just online, if it's still online
' Request.ServerVariables ("REMOTE_ADDR") Gets the IP
if request.servervariables ("REMOTE_ADDR") =ly (i*2-1) then
sameip=1
that issued the requesting machine ly (i*2) =SJ
end if
next
3: Save the latest IP address for the current page to people.asp
' Start writing data to people.asp this file
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