Click to See Complete Forum and Search --> : Logging IP address of the client machine


raktims
02-03-2003, 11:50 AM
Hi,

If want to get the IP address of the client machine that is accessing my server for logging, in a ASP function, how can do it ?

Thanks,
Raktims.

Ribeyed
02-03-2003, 12:20 PM
Hi,
add into your global.asa.

Sub Session_OnStart
set BC = server.createobject("MSWC.BrowserType")
IPAddress = Request.ServerVariables("remote_addr")

/////you can also retreive the follow from the HTTP Header

UserAgent = Request.Servervariables ("HTTP_USER_AGENT")
Browser = BC.Browser & " " & BC.Version
DHTMLSupport = cstr(BC.dhtml)
FramesSupport = cstr(BC.frames)
TablesSupport = cstr(BC.tables)
CookiesSupport = cstr(BC.cookies)
BackGroundSounds = cstr(BC.backgroundsounds)
JavaScriptSupport = cstr(BC.javascript)
JaveAppletsSupport = cstr(BC.javaapplets)
ActiveXControlsSupport = cstr(BC.activexcontrols)
AOL = cstr(BC.aol)
Platform = cstr(BC.platform)
VBScriptSupport = cstr(BC.vbscript)
FullReferer = Request.ServerVariables("http_referer")

End Sub

Hope this helps

raktims
02-03-2003, 12:50 PM
Thanks. it worked.
Raktims