I'm having major trouble trying to get bits of elements and returning the strings.
I have a few exmaples of trying to get the strings and what not but failing hard.
HTML Phrasing is difficult for me to do so help would be appreciated.
Explantion of what I need:
I need to get the strinsg of different elements off this site when entering a IP
http://www.ip-tracker.org/
I need pretty much all the details but into labels or text boxes.
Or this with xml phrasing
http://ip-api.com/xml/8.8.8.8
So here is the exmaple that i've used so far but haven't got far with it.
Exmaple 1:
Dim client As New WebClient
Dim ip As String
Dim city As String
Dim Region As String
Private Function GetIp()
Try
Dim Page As String = client.DownloadString("http://www.ip-tracker.org/locator/ip-lookup.php?ip=82.16.38.43/")
ip = Page.Substring(Page.IndexOf("IP Address:") + 80)
ip = ip.Substring(0, city.IndexOf(" </td") + 30)
TextBox2.Text = ("IP Address: " + ip)
Catch ex As Exception
city = "Unable to lookup"
End Try
Return 0
End Function
To call it:
getViews()
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…