Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.Net
- Public Class Form1
- Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- adresstb.Text = My.Settings.adress
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- My.Settings.adress = adresstb.Text
- Get_Info(adresstb.Text)
- Timer1.Start()
- End Sub
- Public Sub Get_Info(ByVal adress As String)
- 'Get Adress Infos including tablecells
- Dim wb As New WebClient
- Dim sourcecode As String = wb.DownloadString("http://middlecoin.com/")
- Dim delstring As String = "<a href=""reports/" & adress & ".html"">"
- Dim a As String = sourcecode.Substring(sourcecode.IndexOf("<td>" & adress))
- a = a.Substring(0, a.IndexOf("</tr>"))
- a = a.Replace(delstring, "")
- a = a.Replace("</a>", "")
- Dim result() As String = Split(a, "<td>")
- Dim MyList As New List(Of String)()
- For Each info As String In result
- info = info.Replace("</td>", "")
- MyList.Add(info)
- Next
- 'Debug Output
- tb1.Text = MyList(2)
- tb2.Text = MyList(3)
- tb3.Text = MyList(4)
- tb4.Text = MyList(5)
- tb5.Text = MyList(6)
- tb6.Text = MyList(7)
- Return
- End Sub
- Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
- Get_Info(adresstb.Text)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement