How do I post that information into like a text box or a string?
"Timo" <ti*************@luukku.comwrote in message news:g_******************@reader1.news.jippii.net. ..
Ok. Import namespaces:
Imports System.IO
Imports System.Net
Imports System.Text
that should help. Variable PageHTML will contain the content
of the www-page. Extract the section from it. Replace
"http://www.contoso.com/" with the url you want to access.
However, if you do not know the url then this won't be the
solution you're looking for.
- Timo
"Daniel N" <De******@yahoo.comwrote in message news:4y***********@newsfe09.lga...
How should I declare WebRequest, HttpWebRequest and Encoding? They come up undeclaured when I copy and paste.
I just wanted to read one section of informaiton from a website, but I dont not know the site address, an executable launches a web app that gives me certian information, and I just wanted to copy that into a string or integer.
Thanks for the help
"Timo" <ti*************@luukku.com
Hope this one helps:
Dim HttpWebReq As System.Net.HttpWebRequest
Dim WebResp As System.Net.HttpWebResponse
Dim WebStream As System.IO.Stream
Dim WebReader As System.IO.StreamReader
Dim PageHTML As String
HttpWebReq = CType(WebRequest.Create("http://www.contoso.com/"),
HttpWebRequest)
WebResp = CType(HttpWebReq.GetResponse(), System.Net.HttpWebResponse)
WebStream = WebResp.GetResponseStream
WebReader = New System.IO.StreamReader(WebStream, Encoding.Default)
PageHTML = WebReader.ReadToEnd
WebResp.Close() ' Close finally to free resources