Get Country Name by Client IP

Add WebService Reference of

http://www.webservicex.net/geoipservice.asmx?wsdl

Here is the code:

Dim objWebServiceX As New webservicex.GeoIPService
Dim countryName As String = objWebServiceX.GetGeoIP(Request.ServerVariables("REMOTE_ADDR")).CountryName
Response.Write(countryName & " <br/>")

No comments:

Post a Comment