vb.net - how to handle multiple uploads? -
i'm writing program can upload files multiple ftp servers.
there table, @ top row there sites, , @ far left column there files. through table define should uploaded where.
the program working, want upload files parallely on each site. when hit start each column go through rows on own , upload files site if content of specific cell says so. sites can number between 1 , 50. , uploads should in parallel. (one file @ time each site)
what asking best way handle such thing? know have set multiple uploaders, confusing me how keep track each site doing. thing can come array of arrays. each position site, , array @ position defines file beeing uploaded , informations needs that. solution?
thanks!
you can put data array use loop
use code
$web = ['www.firstsite.com','www.secondsite.com'] $user = ['firstuser','seconduser'] $pass = ['firstpass','secondpass'] for($i=0;$i<sizeof($web);$i++) { $conn_id = ftp_connect($web[$i]); $login_result = ftp_login($conn_id,$user[$i],$pass[$i]); if (ftp_put($conn_id, $server_file, $local_file, ftp_binary)) {echo "success";} else {echo "failed";} }
Comments
Post a Comment