Nov 18, 2016 07:25 PM
(This post was last modified: Nov 19, 2016 03:58 PM by Phoenix_101VB.NET_DUDE.)
First have 1 textboxe and a richtextbox1, textbox1 for the url then have a button to display the code into richtextbox1.
Then import System.IO
Copy and paste this code into the button.
Dim Str As System.IO.Stream
Dim srRead As System.IO.StreamReader
Try
' make a Web request
Dim req As System.Net.WebRequest = System.Net.WebRequest.Create(TextBox1.Text)
Dim resp As System.Net.WebResponse = req.GetResponse
Str = resp.GetResponseStream
srRead = New System.IO.StreamReader(Str)
' read all the text
RichTextBox1.Text = srRead.ReadToEnd
Catch ex As Exception
RichTextBox1.Text = "Unable to download content"
Finally
' Close Stream and StreamReader when done
srRead.Close()
Str.Close()
End Try
Done! 🤝
So far it only get the the webpage's code from .com domains, I've just been messing around with this.., when I have time I'll try to implement .net and shit, I just wanted to share this because it's a little interesting. 😎
Right..., seems like some people here don't know what I meant by it can't grab the code from .net domains I'm not completely sure that it can grab code from other domains I haven't had enough time to mess around with it more, when you copy and paste an url that has a .net domain it'll give you an error so I just thought that this can only get the webpage's code from a .com domain, so everyone that says I don't know what I'm talking aboutyou are correct like I said "I'm messing around with it"
Then import System.IO
Copy and paste this code into the button.
Dim Str As System.IO.Stream
Dim srRead As System.IO.StreamReader
Try
' make a Web request
Dim req As System.Net.WebRequest = System.Net.WebRequest.Create(TextBox1.Text)
Dim resp As System.Net.WebResponse = req.GetResponse
Str = resp.GetResponseStream
srRead = New System.IO.StreamReader(Str)
' read all the text
RichTextBox1.Text = srRead.ReadToEnd
Catch ex As Exception
RichTextBox1.Text = "Unable to download content"
Finally
' Close Stream and StreamReader when done
srRead.Close()
Str.Close()
End Try
Done! 🤝
So far it only get the the webpage's code from .com domains, I've just been messing around with this.., when I have time I'll try to implement .net and shit, I just wanted to share this because it's a little interesting. 😎
Right..., seems like some people here don't know what I meant by it can't grab the code from .net domains I'm not completely sure that it can grab code from other domains I haven't had enough time to mess around with it more, when you copy and paste an url that has a .net domain it'll give you an error so I just thought that this can only get the webpage's code from a .com domain, so everyone that says I don't know what I'm talking aboutyou are correct like I said "I'm messing around with it"




![[Image: vjPWhyy.gif]](https://i.imgur.com/vjPWhyy.gif)