| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions! Dokkio, a new product from the PBworks team, integrates and organizes your Drive, Dropbox, Box, Slack and Gmail files. Sign up for free.

View
 

Geolocating Using a  Web Service Example

Page history last edited by PBworks 9 years, 1 month ago

 Geolocating Using a Web Service

 

 

Prerequisites

 

Knowledge of .NET, Visual Studio

 

Description of Video

 

In this example I use a commercial web service to convert an IP Address into location information. The example goes through the full coding of the application.

 

Video 

 

Download Link (right click and save target as ...). 

 

 

Reference Materials

 

Location of Web Service

 

http://ws.fraudlabs.com/ip2locationwebservice.asmx

 

Code from example application.

 

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim ws As New IP2Location.Ip2LocationWebService
        Dim location As New IP2Location.IP2LOCATION

        Dim ip(10) As System.Net.IPAddress
        Dim dns As System.Net.Dns
        Dim host As String

        host = dns.GetHostName()

        ip = dns.GetHostAddresses(host)
        lblIP.Text = ip(0).ToString

        location = ws.IP2Location(lblIP.Text, "Your Key Here")

        lblCity.Text = location.ToString

    End Sub

 

Additional Information

 

References to Web Services that can be used for Geocoding are available at Technologies Used in Web Systems

 

Comments (0)

You don't have permission to comment on this page.