Results 1 to 2 of 2

Thread: [VB6] Get External IP

  1. #1

    Thread Starter
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    [VB6] Get External IP

    A lot of people seem to ask this question, so I wrote this real quick.

    One benefit of this over most other external IP grabbers, is it should work on all sites without you having to change the code. Most other IP grabbers are hard-coded to work with specific HTML. If that site goes down or changes their HTML, then they won't work like they should.

    This can extract all IPs found on a website or just the first one it finds. I put all the code into a module so all you have to do is add the module to your project and call the ExtractIPs(HTML) function.

    I didn't use regular expressions for this because I didn't want to add an unnecessary dependency.
    Attached Files Attached Files

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: [VB6] Get External IP

    Very nice idea.

    I'd prefer (in ExtractIPs)

    Code:
    If lonEnd > lonIPStart Then
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

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