Display user's IP address when visiting internal site

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JayPee

    Display user's IP address when visiting internal site

    Here is my dilema. I'm running IIS on a Windows 2000 Proffessional PC.
    I'm a running a small intranet site off this machine which is
    accessible by the end users by typing in the computer name of this
    machine. What I need is a script of any kind that will allow me to
    capture the end users internal IP address and display it on the status
    bar of their IE window (Bottom left). Again, the only people accessing
    this site are internal users and I want them to see what their IP
    address is whenever they access the main page of the site. Is this
    possible? Any help is appreciated.

    -Jorge
  • Dom Leonard

    #2
    Re: Display user's IP address when visiting internal site

    JayPee wrote:[color=blue]
    > I'm running IIS on a Windows 2000 Proffessional PC.
    > I'm a running a small intranet site off this machine which is
    > accessible by the end users by typing in the computer name of this
    > machine. What I need is a script of any kind that will allow me to
    > capture the end users internal IP address and display it on the status
    > bar of their IE window (Bottom left). Again, the only people accessing
    > this site are internal users and I want them to see what their IP
    > address is whenever they access the main page of the site. Is this
    > possible?[/color]

    Assuming the main page is an ASP page (or can be made one) and tested
    for 127.0.0.1 only, in the head section include:

    <script type="text/javascript">
    var sIpAddress = "<%= Request.ServerV ariables("REMOT E_ADDR") %>";
    window.defaultS tatus = sIpAddress;
    </script>


    FWIW,
    Dom






    Comment

    • esrkq

      #3
      Re: Display user's IP address when visiting internal site

      Check this out:




      "JayPee" <jpmx6gt@hotmai l.com> wrote in message
      news:a8747569.0 309151435.1ddd1 e14@posting.goo gle.com...[color=blue]
      > Here is my dilema. I'm running IIS on a Windows 2000 Proffessional PC.
      > I'm a running a small intranet site off this machine which is
      > accessible by the end users by typing in the computer name of this
      > machine. What I need is a script of any kind that will allow me to
      > capture the end users internal IP address and display it on the status
      > bar of their IE window (Bottom left). Again, the only people accessing
      > this site are internal users and I want them to see what their IP
      > address is whenever they access the main page of the site. Is this
      > possible? Any help is appreciated.
      >
      > -Jorge[/color]


      Comment

      • Stephen

        #4
        Re: Display user's IP address when visiting internal site

        Hi there

        [posting sequence restored]
        [color=blue]
        > "JayPee" <jpmx6gt@hotmai l.com> wrote in message
        > news:a8747569.0 309151435.1ddd1 e14@posting.goo gle.com...
        >[color=green]
        >>Here is my dilema. I'm running IIS on a Windows 2000 Proffessional PC.
        >>I'm a running a small intranet site off this machine which is
        >>accessible by the end users by typing in the computer name of this
        >>machine. What I need is a script of any kind that will allow me to
        >>capture the end users internal IP address and display it on the status
        >>bar of their IE window (Bottom left). Again, the only people accessing
        >>this site are internal users and I want them to see what their IP
        >>address is whenever they access the main page of the site. Is this
        >>possible? Any help is appreciated.
        >>
        >>-Jorge[/color]
        >
        >
        >[/color]
        esrkq wrote:[color=blue]
        > Check this out:
        > http://javascript.internet.com/user-...p-address.html
        >
        >[/color]

        Warning !!
        Please Note !! This is really a server-side solution, similar to the
        already-mentioned ASP solution. This solution only works if the SERVER
        supports and implements server-side includes. This isn't really a
        javascript solution, per se. (ie, it isn't *javascript* that is
        detecting the IP number! (true also of the ASP solution) Plus, what's
        displayed isn't really my machine's IP number anyway. But that probably
        won't be an issue in the OP's scenario)

        If you're using IIS, it's probably better to use the ASP version, IMO.
        Regards,
        Stephen



        Comment

        Working...