Results 1 to 8 of 8

Thread: Getting an IP Address using VBScript

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    RI
    Posts
    25

    Getting an IP Address using VBScript

    How would you get an IP Address using VBScript? Thanks
    - Gabe

  2. #2
    Lively Member
    Join Date
    Mar 2001
    Location
    Sweden
    Posts
    115
    Request.Servervariables("REMOTE_HOST")

    This is server-side

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    RI
    Posts
    25

    vbscript - ip address

    greetings,

    im 18 and work at apc, and im in charge of the lan here at one of the buildings and also head of the web department. is there a way using vbscript to get the ip address a computer when the browser is loaded? that way all the clients that go to a link.. example..

    http://intranet/network/ip_used

    that way it will write the ip address of the computer to a file so that a program that i made will be able to search through that text file and return the status of all the ipaddress and see which ones are used. the program is called Verify IP and is loacated here...

    www.geocities.com/mountainpics/downloads

    thanks so much. all i need is the code to get the ip address when the browser is loaded up. thanks!
    - Gabe

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    RI
    Posts
    25

    sorry

    im sorry, but the download is unavaiable... i cannot seem to upload the cab files...
    - Gabe

  5. #5
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Originally posted by CreoN
    Request.Servervariables("REMOTE_HOST")

    This is server-side
    And this didn't work?
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    RI
    Posts
    25

    error

    it throws up an error at reguest. i using the vbscript for client side.
    - Gabe

  7. #7
    Frenzied Member
    Join Date
    Feb 2001
    Posts
    1,140
    Yes, I would hope that you couldn't get it client-side for the reasons that Josh pointed out. My machines IP address is not its broadcast address. But... try this.

    And forgive me, I never use VBScript for client-side scripting, so you will have to translate from JavaScript to VBScript.

    Code:
    <html>
    
      <head></head>
    
      <body>
    
        <script language='JavaScript'>
          var clientIP = <%=Request.ServerVariables("REMOTE_ADDR")%>;
        </script>
    
      </body>
    
    </html>
    Travis, Kung Foo Journeyman
    As always, RTFM.

    WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
    Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
    YBMS, but Mozilla doesn't.

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Apr 2001
    Location
    RI
    Posts
    25

    Thanks

    Thanks.
    - Gabe

Posting Permissions

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



Click Here to Expand Forum to Full Width