Announcement

Collapse
No announcement yet.

URL address of caller

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    URL address of caller

    How can I find the URL address showing in the address bar of whoever accessed a page via HS?

    For example, from home, the url for home might be like this:

    http://192.168.1.xx:8080 which opens the default web page

    Outside home, it might be like this:

    http://xxx.xxx.xxx.xx:8080

    I'm looking for the part between http:// & :8080. In IIS, this is a simple request.servervariables call.

    Is there a trick using jscript or other method to get this? I need to create a multi-domain-aware home page that displays different pages depending on what domain or ip is used for calling.

    Sounds easy right?
    huggy_d1

    Automating made easy

    #2
    You can use:

    RemoteIP=Request.ServerVariables("REMOTE_ADDR")

    Within a script you can also use hs.GetLastRemoteIP
    Jon

    Comment


      #3
      The hs.GetLastRemoteIP appears to only provide the IP address. If the URL is wanted that may need to be submitted elsewhere and then scrape the URL info from that webpage.

      ip-lookup.net gives info if you provide an IP.
      IP : 216.228.178.123
      Host : bc178123.bendcable.com
      Country : United States

      I'm sure there may be a way of automating this and then do a web scraping.


      ~Bill

      Comment


        #4
        Does Jon00's script maybe help?

        http://board.homeseer.com/showthread...light=visiting


        ~Bill

        Comment


          #5
          Normally in IIS you use server variable ("url") I think.

          I found a supported workaround by creating a landing .aspx default page that looks at several things, then redirects to the right page.

          For example, locally logged in as me, it brings up my page. I bring up my domain remotely and it brings up my page. For high WAF, she has her own domain, and now when she types her domain, the landing page senses it with:

          strUrl = Request.ServerVariables("HTTP_HOST")

          Then it can decide which page to redirect and magic happens.

          This has already raised a few eyebrows and smirks since I didn't really tell her she has her own domain (yet). She thinks it is just network magic

          Note the above does not seem to show support in the online help, but does work in .aspx vb.net.

          Thanks for the ideas. Now I have a very cheap inbound multi-domain site.... sort of
          huggy_d1

          Automating made easy

          Comment

          Working...
          X