Here's a function I wrote for what you're asking, if I understand you.
For this to work you need Imports System.Net and Imports System.IO.
Public Function GetSource(ByVal URL As String) As String
Dim vSource As String = ""
Dim HTTPRequest As HttpWebRequest
Dim vURL As Uri
Dim sr As StreamReader
Dim Ln As String
Dim rs As HttpWebResponse
Dim inStr As Stream
Dim line As String
Dim bodyReader As StreamReader
If Not (inStr) Is Nothing Then
bodyReader = New StreamReader(inStr)
line = bodyReader.ReadLine()
Do While (line) Is Nothing = False
vSource &= line & vbCrLf
line = bodyReader.ReadLine()
Loop
bodyReader.Close()
bodyReader = Nothing
End If
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.