hidden ftp upload
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
6 posts
Page 1 of 1
hi how do i make a hidden ftp upload? liek i dont want the progressbarr dialog to show when u upload somethign to your ftp.
Hello, try using WebClient.
Code: Select all
Dim wcl As New Net.WebClient
wcl.Credentials = New Net.NetworkCredential("user", "pass")
wcl.UploadFile("address", "fileloc") ' Then you use multi-threading to stop it from freezing your application or just use: wcl.UploadFileAsync(New Uri("address"), "fileloc")
If you have a web hosting in the same server you can simply create a page with a php script for upload of files and you just upload your file at this address and it will show nothing
admin@adosrv.net
Owner of ado-srv.net softwares network.
Owner of ado-srv.net softwares network.
Or this:
Code: Select all
Or this:My.Computer.Network.UploadFile("c:\File.txt", "http://www.someserver.com/upload.aspx", "username", "password", False, 500)
Code: Select all
Dim Upload As System.Net.FtpWebRequest = DirectCast(System.Net.WebRequest.Create("ftp://ftp.YOURSITE.com/SaveUploadedFileToThisName.txt"), System.Net.FtpWebRequest)
Upload.Credentials = New System.Net.NetworkCredential("USERNAME", "PASSWORD")
Upload.Method = System.Net.WebRequestMethods.Ftp.UploadFile
Dim Enc As New System.Text.UTF8Encoding()
Dim File() As Byte = Enc.GetBytes("C:\FileToUpload.txt")
Dim UploadStream As System.IO.Stream = Upload.GetRequestStream()
UploadStream.Write(File, 0, File.Length)
UploadStream.Close()
UploadStream.Dispose()
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
macHard wrote:Hello, try using WebClient.What do you meane with my program will freeze? Also could you explain more how it could make it not to freeze dident really get it.
Code: Select allDim wcl As New Net.WebClient wcl.Credentials = New Net.NetworkCredential("user", "pass") wcl.UploadFile("address", "fileloc") ' Then you use multi-threading to stop it from freezing your application or just use: wcl.UploadFileAsync(New Uri("address"), "fileloc")
Martin wrote:Let's say this code works through a button on the form. You click it, then this program will just wait till the function is completed, in this case file upload. That prevents you to do anything on the form until file upload is complete.macHard wrote:Hello, try using WebClient.What do you meane with my program will freeze? Also could you explain more how it could make it not to freeze dident really get it.
Code: Select allDim wcl As New Net.WebClient wcl.Credentials = New Net.NetworkCredential("user", "pass") wcl.UploadFile("address", "fileloc") ' Then you use multi-threading to stop it from freezing your application or just use: wcl.UploadFileAsync(New Uri("address"), "fileloc")
6 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023