Log users IP address
This ASP example will retrieve a visitors IP address and store it in a file called log.txt. Note that the text file has to exist, you could of course create this or have some sort of validation that the file exists first.
<%
IPAddress=Request.ServerVariables (”REMOTE_ADDR”)
Set objFSO = CreateObject(”Scripting.FileSystemObject”)
Set objFile = objFSO.OpenTextFile(”c:\log.txt”, forappending)
objFile.WriteLine (IPAddress)
objFile.close
Set objFile=nothing
Set objFSO=nothing
%>




























