Fixed
Code
Imports System.Xml.XPath
Public Class Form1
Dim datetime, ip, Connection, RemotePort, ProxyType, UserAgent, Hostname, Country, Region, ISP, City, Protocol, language As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Try
Dim doc As XPathDocument
doc = New XPathDocument("http://ip-address.domaintools.com/myip.xml")
Dim nav As XPathNavigator
nav = doc.CreateNavigator()
Dim Data As XPathExpression = nav.Compile("//ip_address")
Dim getuserinfo As XPathNodeIterator = nav.Select(Data)
While (getuserinfo.MoveNext())
Ip = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//date")
While (getuserinfo.MoveNext())
Datetime = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//connection")
While (getuserinfo.MoveNext())
Connection = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//remote_port")
While (getuserinfo.MoveNext())
RemotePort = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//proxy_type")
While (getuserinfo.MoveNext())
ProxyType = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//user_agent")
While (getuserinfo.MoveNext())
UserAgent = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//hostname")
While (getuserinfo.MoveNext())
Hostname = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//country")
While (getuserinfo.MoveNext())
Country = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//region")
While (getuserinfo.MoveNext())
Region = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//isp")
While (getuserinfo.MoveNext())
ISP = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//city")
While (getuserinfo.MoveNext())
City = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//protocol")
While (getuserinfo.MoveNext())
Protocol = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//language")
While (getuserinfo.MoveNext())
Language = (getuserinfo.Current.Value)
End While
getuserinfo = nav.Select("//country_flag")
While (getuserinfo.MoveNext())
PictureBox1.ImageLocation = (getuserinfo.Current.Value)
End While
Label1.Text = "Ip : " + ip
Label2.Text = "Connection : " + Connection
Label3.Text = "RemotePort : " + RemotePort
Label4.Text = "ProxyType : " + ProxyType
Label5.Text = "UserAgent : " + UserAgent
Label6.Text = "Hostname : " + Hostname
Label7.Text = "Country : " + Country
Label8.Text = "Region : " + Region
Label9.Text = "ISP : " + ISP
Label10.Text = "City : " + City
Label11.Text = "Protocol : " + Protocol
Label12.Text = "Datetime : " + datetime
Label13.Text = "language : " + language
Catch ex As Exception
End Try
End Sub
End Class