pulsmartin
Member
- Joined
- Jun 3, 2009
- Messages
- 6
- Programming Experience
- 1-3
I have the following code, at some point it was working, and now it just gives me back an empty string, I don't think I made any major changes.
Try
Dim myrequest As WebRequest = WebRequest.Create("http://whatever.php")
Dim myresponse As WebResponse = myrequest.GetResponse
Dim mystream As Stream = myresponse.GetResponseStream
Dim myreader As StreamReader = New StreamReader(mystream)
Dim mytext As String = myreader.ReadToEnd
RichTextBox1.Text = mytext
Catch ex As Exception
End Try
Try
Dim myrequest As WebRequest = WebRequest.Create("http://whatever.php")
Dim myresponse As WebResponse = myrequest.GetResponse
Dim mystream As Stream = myresponse.GetResponseStream
Dim myreader As StreamReader = New StreamReader(mystream)
Dim mytext As String = myreader.ReadToEnd
RichTextBox1.Text = mytext
Catch ex As Exception
End Try