haporn
11-18-2006, 07:18 PM
I'm trying to mirror some files from one dedicated box with PHP and FTP
I want the files to upload concurrently to different servers
instead of uploading to one server at a time.
Any gurus know how to do this? Thanks!
my code has been like:
$conn_id = ftp_connect("iphere");
// login with username and password
$login_result = ftp_login($conn_id, "username", "pass");
// upload the file
$upload = ftp_put($conn_id, "/files/blah.bah","blah.bah", FTP_BINARY);
// close the FTP stream
ftp_close($conn_id);
but this only uploads one at a time. I was thinking forking but then
I read forking isnt supposed to be used with webservers? Any help is appreciated!
I want the files to upload concurrently to different servers
instead of uploading to one server at a time.
Any gurus know how to do this? Thanks!
my code has been like:
$conn_id = ftp_connect("iphere");
// login with username and password
$login_result = ftp_login($conn_id, "username", "pass");
// upload the file
$upload = ftp_put($conn_id, "/files/blah.bah","blah.bah", FTP_BINARY);
// close the FTP stream
ftp_close($conn_id);
but this only uploads one at a time. I was thinking forking but then
I read forking isnt supposed to be used with webservers? Any help is appreciated!
