Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TUT]FTP Connection[TUT]
#1
Code:
Dim clsRequest As System.Net.FtpWebRequest = _
            DirectCast(System.Net.WebRequest.Create("ftp://ftp.myserver.com/test.txt"), System.Net.FtpWebRequest)
        clsRequest.Credentials = New System.Net.NetworkCredential("myusername", "mypassword")
        clsRequest.Method = System.Net.WebRequestMethods.Ftp.UploadFile

        ' read in file...
        Dim bFile() As Byte = System.IO.File.ReadAllBytes("C:\Temp\test.txt")

        ' upload file...
        Dim clsStream As System.IO.Stream = _
            clsRequest.GetRequestStream()
        clsStream.Write(bFile, 0, bFile.Length)
        clsStream.Close()
        clsStream.Dispose()

Don't understand it just pm me.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to hook the keyboard. [VB.NET] [TuT] Vorfin 92 55,332 09-23-2019, 11:55 AM
Last Post: Jamimartin
  [TUT]Creating Advanced Web Browser with Awesome Theme Imaking31 0 1,320 05-25-2013, 03:12 AM
Last Post: Imaking31
  VB.NET Port Scanner [TUT] Fragma 30 12,839 11-27-2012, 11:26 PM
Last Post: ƃu∀ ıʞƃu∀
  [TUT] MD5 Encrypter & Finder [VB.NET] Fragma 12 7,033 11-25-2012, 10:36 PM
Last Post: ƃu∀ ıʞƃu∀
  [TUT] How to make a simple WebBrowser in VB 2010! [TUT] - [ Pictures] Statics 95 56,055 10-07-2012, 06:56 AM
Last Post: a99

Forum Jump:


Users browsing this thread: 1 Guest(s)