dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: Logging IP address of the client machine

  1. #1
    Join Date
    Jan 2003
    Posts
    23

    Logging IP address of the client machine

    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.

  2. #2
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    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

  3. #3
    Join Date
    Jan 2003
    Posts
    23
    Thanks. it worked.
    Raktims

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles