|
|
|
|
|
| | |
|
vbscript active server pages ASP vbscript SQL database informix oracle SQL Server Perl CGI Delphi PHP source code code sample samples program CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
listing ip addresses of those looking at a page |
From: |
Englishman |
Date: |
6/5/2000 8:14:16 AM |
IP: |
194.222.27.187 |
Please can someone help!
I need to list on a page all the ip addresses of the people looking at that page.
I would rather not use a DB or global.asa if it is at all possible.
The code below list all those who have connected to the page but the list just gets longer and longer. How can I remove those who have left the page?
Cheers all.
<%
RemoteIP=Request.ServerVariables("REMOTE_ADDR")
application("num")=application("num")+1
s="var"+cstr(application("num"))
i=0
found=false
while i<application("num")+1
t="var"+cstr(i)
if application(t)=RemoteIP then
found=true
end if
i=i+1
wend
if not found then
application(s)=RemoteIP
end if
%>
<html>
<body>
<P>
<%
i=0
while i<application("num")+1
t="var"+cstr(i)
response.write("<p> " +application(t))
i=i+1
wend
%>
</body>
</html>
|
Follow Up - Re: listing ip addresses of those looking at a page - Derick Bailey 6/15/2000 12:42:16 PM
|
|
|
|
|
|
|
|
|
|
|
|