Click here to Skip to main content
13,901,221 members
Click here to Skip to main content
Add your own
alternative version


26 bookmarked
Posted 12 Sep 2005

Working with IP Addresses

, 12 Sep 2005
Rate this:
Please Sign up or sign in to vote.
Using a web service to find the location of an IP address...


Imagine you have developed your own website, there are thousands of people visiting your website everyday. Do you want to know who your visitors are? In my article, I use a Web Service from to find the location of the IP addresses.

Using the Code

First, you have to create a new application in Microsoft Visual Studio .NET 2003. To use the Web Service from, you have to let your application connect to the service and use its functions. In the Solution Explorer, right-click on Reference in your project and select Add Web Reference.

Then, the Add Web Reference window appears, type the address of your Web Service in the address bar. Our Web Service address is

After the Web Service is found, type the name of the Web Reference in the Web Reference name text box. Finally, click on Add Reference button to add the Web Reference into your application.

Now, let's code for our application!!!

First of all, if you want to find the location of an IP Address, you simply type the IP address in a textbox, and click the button, the details of the IP address will be shown in the label below.

Private Sub btnOK_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles btnOK.Click
     Dim ws As New GeoIPService.GeoIPService
     lblInformation.Text = "Country: " & _
End Sub

When you type the IP address in the textbox and click the button, the information about the IP address will be shown in the label as in the picture below:


I hope you will find some interesting things in this article. By using this Web Service, you know who visited your website by saving their IP address and using the web service to find their location.

If you feel interested in working with Web Services, let's take a look over at the website, there are more Web Services on this website that will be helpful for you!


This article has no explicit license attached to it, but may contain usage terms in the article text or the download files themselves. If in doubt, please contact the author via the discussion board below.

A list of licenses authors might use can be found here.


About the Author

Thang T.
Software Developer (Senior)
Vietnam Vietnam
I've been working as a freelance iOS developer since the invention of the original iPhone. After numbers of projects, I gain more and more experience, get familiar with popular 3rd-party libraries which can save time and cost in the development.

With the experiences gained by working on projects, I proudly offer consultancy service which supports my customers to (1) get the best way to develop their apps; (2) start up iOS apps business professionally & effectively.

My day starts with the practices Japanese traditional Martial Arts: Kendo ( & Iaido ( Therefore, I always work with Samurai Spirit in the entire day, no FEAR and willing to take CHALLENGES!

If you need to get your iOS games or apps done, I'm available at oDesk!

You may also be interested in...

Comments and Discussions

General[Message Removed] Pin
hankjmatt13-Oct-08 22:12
memberhankjmatt13-Oct-08 22:12 
GeneralNice Article Pin
kkaratasli31-Jul-06 6:14
memberkkaratasli31-Jul-06 6:14 
Generalip address Pin
sahar.taheri10-Feb-06 4:12
membersahar.taheri10-Feb-06 4:12 
QuestionHow can I find IP? Pin
mahila20-Dec-05 2:13
membermahila20-Dec-05 2:13 
AnswerRe: How can I find IP? Pin
Thang T.20-Dec-05 13:36
memberThang T.20-Dec-05 13:36 
GeneralRe: How can I find IP? Pin
mahila20-Dec-05 20:00
membermahila20-Dec-05 20:00 
GeneralRe: How can I find IP? Pin
Thang T.21-Dec-05 3:52
memberThang T.21-Dec-05 3:52 
GeneralRe: How can I find IP? Pin
mahila23-Dec-05 18:14
membermahila23-Dec-05 18:14 
GeneralRe: How can I find IP? Pin
Walton.Dave23-Feb-06 8:11
memberWalton.Dave23-Feb-06 8:11 
GeneralRe: How can I find IP? Pin
Thang T.24-Feb-06 4:01
memberThang T.24-Feb-06 4:01 
GeneralWere can i find the database Pin
vikas amin12-Sep-05 23:05
membervikas amin12-Sep-05 23:05 
GeneralRe: Were can i find the database Pin
tom_dx13-Sep-05 2:05
membertom_dx13-Sep-05 2:05 
GeneralRe: Were can i find the database Pin
Thang T.13-Sep-05 3:17
memberThang T.13-Sep-05 3:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web01 | 2.8.190306.1 | Last Updated 12 Sep 2005
Article Copyright 2005 by Thang T.
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid