Imports System Imports System.Net Imports System.IO Imports System.Environment Public Class Form3 Dim counter As Integer Sub main() Dim sOutput As String Dim sOutput2 As String Dim rsn As String = TextBox1.Text.Replace(" ", "_") Dim sURL As String = "http://www.users.on.net/~adtory/stats.php?user=" & rsn Dim sURL2 As String = "http://www.slushpuppy.silverinterlocution.org/rsstats.php?stats=" & rsn Try Dim objNewRequest As WebRequest = HttpWebRequest.Create(sURL) Dim objResponse As WebResponse = objNewRequest.GetResponse Dim objStream As New StreamReader(objResponse.GetResponseStream()) sOutput = objStream.ReadToEnd() Catch eWEB As WebException sOutput = "Kan de site niet bereiken" Catch e As Exception sOutput = e.ToString Finally Dim aryTextFile() As String aryTextFile = sOutput.Split(" is ") If aryTextFile(2) = "does" Or TextBox1.Text = "" Then TextBox2.Text = "/" TextBox3.Text = "/" TextBox4.Text = "/" TextBox5.Text = "/" TextBox6.Text = "/" TextBox7.Text = "/" TextBox8.Text = "/" TextBox9.Text = "/" TextBox10.Text = "/" TextBox11.Text = "/" TextBox12.Text = "/" TextBox13.Text = "/" TextBox14.Text = "/" TextBox15.Text = "/" TextBox16.Text = "/" TextBox17.Text = "/" TextBox18.Text = "/" TextBox19.Text = "/" TextBox20.Text = "/" TextBox21.Text = "/" TextBox22.Text = "/" TextBox23.Text = "/" TextBox24.Text = "/" TextBox25.Text = "/" Else TextBox24.Text = aryTextFile(2) TextBox10.Text = aryTextFile(5) TextBox4.Text = aryTextFile(8) TextBox3.Text = aryTextFile(11) TextBox5.Text = aryTextFile(14) TextBox6.Text = aryTextFile(17) TextBox18.Text = aryTextFile(20) 'row 2 TextBox7.Text = aryTextFile(23) TextBox8.Text = aryTextFile(26) TextBox11.Text = aryTextFile(29) TextBox12.Text = aryTextFile(32) TextBox9.Text = aryTextFile(35) TextBox21.Text = aryTextFile(38) TextBox19.Text = aryTextFile(41) TextBox13.Text = aryTextFile(44) TextBox14.Text = aryTextFile(47) TextBox15.Text = aryTextFile(50) TextBox16.Text = aryTextFile(53) TextBox17.Text = aryTextFile(56) TextBox20.Text = aryTextFile(59) TextBox26.Text = aryTextFile(62) TextBox25.Text = aryTextFile(65) TextBox23.Text = aryTextFile(68) Dim objNewRequest2 As WebRequest = HttpWebRequest.Create(sURL2) Dim objResponse2 As WebResponse = objNewRequest2.GetResponse Dim objStream2 As New StreamReader(objResponse2.GetResponseStream()) sOutput2 = objStream2.ReadToEnd() sOutput2 = sOutput2.Replace("
", "") Dim aryTextFile2() As String aryTextFile2 = sOutput2.Split(" is ") TextBox2.Text = aryTextFile2(6) Try sOutput2 = sOutput2.Remove(0, sOutput2.LastIndexOf("Construction:")) sOutput2 = sOutput2.Remove(0, 14) Catch sOutput2 = 0 End Try TextBox22.Text = sOutput2 End If End Try End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click main() End Sub End Class