' Contributed by Rubens A. Lucca Private Function ReturnData(ByVal IP As String) As String Dim objUrl As New System.Uri("http://geoip1.maxmind.com/f?l=YOUR_LICENSE_KEY&i=" & IP) Dim objWebReq As System.Net.WebRequest Dim objResp As System.Net.WebResponse Dim sReader As System.IO.StreamReader Dim strReturn As String 'Try to connect to the server and retrieve data. Try objWebReq = System.Net.WebRequest.Create(objUrl) objResp = objWebReq.GetResponse 'Get the data and store in a return string. sReader = New System.IO.StreamReader(objResp.GetResponseStream) strReturn = sReader.ReadToEnd 'Close the objects. sReader.Close() objResp.Close() Catch ex As Exception Finally objWebReq = Nothing End Try Return strReturn End Function