Snippets

Here is your code snippet

Code


IP address logger

Log a visitors IP address in a text file

<%
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
%>