Christopherx
Well-known member
- Joined
- Jul 4, 2010
- Messages
- 58
- Programming Experience
- Beginner
Writing to a text file over the internet.
Dim url As String
url = "http://swrpdatabase.comli.com/Dubstep%20Tunes.html"
Dim req As WebRequest = WebRequest.Create(url)
Dim resp As WebResponse = req.GetResponse
Dim streams As Stream = resp.GetResponseStream
Dim reader As New StreamReader(streams)
Console.WriteLine(reader.ReadToEnd)
reader.Close()
Console.ReadKey()
This is my code to read a file from the internet. I have heard from a friend however, i can not use the streamwriter class because it does not support URIs. Any help would be greatly appreciated
Im using Vb.net 2008 express edition btw.
Dim url As String
url = "http://swrpdatabase.comli.com/Dubstep%20Tunes.html"
Dim req As WebRequest = WebRequest.Create(url)
Dim resp As WebResponse = req.GetResponse
Dim streams As Stream = resp.GetResponseStream
Dim reader As New StreamReader(streams)
Console.WriteLine(reader.ReadToEnd)
reader.Close()
Console.ReadKey()
This is my code to read a file from the internet. I have heard from a friend however, i can not use the streamwriter class because it does not support URIs. Any help would be greatly appreciated
Im using Vb.net 2008 express edition btw.
Last edited by a moderator: