Want more features on Pastebin? Sign Up, it's FREE!
Guest

sdfefw

By: a guest on Aug 2nd, 2013  |  syntax: VB.NET  |  size: 1.53 KB  |  views: 33  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. Imports System.Net
  3. Public Class Form1
  4.  
  5.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  6.         adresstb.Text = My.Settings.adress
  7.     End Sub
  8.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  9.         My.Settings.adress = adresstb.Text
  10.         Get_Info(adresstb.Text)
  11.         Timer1.Start()
  12.     End Sub
  13.  
  14.     Public Sub Get_Info(ByVal adress As String)
  15.  
  16.         'Get Adress Infos including tablecells
  17.         Dim wb As New WebClient
  18.         Dim sourcecode As String = wb.DownloadString("http://middlecoin.com/")
  19.         Dim delstring As String = "<a href=""reports/" & adress & ".html"">"
  20.         Dim a As String = sourcecode.Substring(sourcecode.IndexOf("<td>" & adress))
  21.         a = a.Substring(0, a.IndexOf("</tr>"))
  22.         a = a.Replace(delstring, "")
  23.         a = a.Replace("</a>", "")
  24.  
  25.         Dim result() As String = Split(a, "<td>")
  26.         Dim MyList As New List(Of String)()
  27.         For Each info As String In result
  28.             info = info.Replace("</td>", "")
  29.             MyList.Add(info)
  30.         Next
  31.         'Debug Output
  32.         tb1.Text = MyList(2)
  33.         tb2.Text = MyList(3)
  34.         tb3.Text = MyList(4)
  35.         tb4.Text = MyList(5)
  36.         tb5.Text = MyList(6)
  37.         tb6.Text = MyList(7)
  38.  
  39.  
  40.  
  41.         Return
  42.     End Sub
  43.  
  44.     Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  45.         Get_Info(adresstb.Text)
  46.     End Sub
  47. End Class
clone this paste RAW Paste Data