Click here to Skip to main content
11,922,641 members (31,763 online)
Click here to Skip to main content
Add your own
alternative version


26 bookmarked

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 23:12
memberhankjmatt13-Oct-08 23:12 
GeneralNice Article Pin
kkaratasli31-Jul-06 7:14
memberkkaratasli31-Jul-06 7:14 
Generalip address Pin
sahar.taheri10-Feb-06 5:12
membersahar.taheri10-Feb-06 5:12 
QuestionHow can I find IP? Pin
mahila20-Dec-05 3:13
membermahila20-Dec-05 3:13 
AnswerRe: How can I find IP? Pin
Thang Q. Tran20-Dec-05 14:36
memberThang Q. Tran20-Dec-05 14:36 
GeneralRe: How can I find IP? Pin
mahila20-Dec-05 21:00
membermahila20-Dec-05 21:00 
GeneralRe: How can I find IP? Pin
Thang Q. Tran21-Dec-05 4:52
memberThang Q. Tran21-Dec-05 4:52 
GeneralRe: How can I find IP? Pin
mahila23-Dec-05 19:14
membermahila23-Dec-05 19:14 
GeneralRe: How can I find IP? Pin
Walton.Dave23-Feb-06 9:11
memberWalton.Dave23-Feb-06 9:11 
GeneralRe: How can I find IP? Pin
Thang Q. Tran24-Feb-06 5:01
memberThang Q. Tran24-Feb-06 5:01 
GeneralWere can i find the database Pin
vikas amin13-Sep-05 0:05
membervikas amin13-Sep-05 0:05 
GeneralRe: Were can i find the database Pin
tom_dx13-Sep-05 3:05
membertom_dx13-Sep-05 3:05 
GeneralRe: Were can i find the database Pin
Thang Q. Tran13-Sep-05 4:17
memberThang Q. Tran13-Sep-05 4: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.

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.151125.1 | Last Updated 12 Sep 2005
Article Copyright 2005 by Thang T.
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid