on-internet
← Community

Getting link from pastebin and downloading from link

Stack Overflow ·

I'm trying to get a link from a pastebin. Where the link is the only text in the raw paste. Then I want to download a file from the link in pastebin. WebRequest request = WebRequest.Create("http://pastebin.com/raw/Dtdf2qMp"); WebResponse response = request.GetResponse(); System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream()); Console.WriteLine(reader.ReadToEnd()); WebClient client = new WebClient(); client.DownloadFile (Link gotten from pastebin here, "c:\\File"); System.Threading.Thread.Sleep(5000);

Comments

Sign in or sign up to comment and upvote.

No comments yet.