Hello,
This is my currenyt script for an FTP function (assuming $conn_id works and has previously been set):
foreach ($content as $file) {
$fo = fopen($fp, 'r');
if (ftp_fput($conn_id, $fp, $fo, FTP_ASCII)) {
echo "Uploading $fp now..<br>";
echo "Successfully uploaded $file<br>";
}
else {
echo "There was a problem while uploading $file\n";
die();
}
This all works fine, however obviously the page just hangs until the FTP upload is complete, leaving the end user guessing how long it will take or whether it will work at all.
So I am asking, is there a way start the FTP function in a different window/browser automatically.
Ideally, I would create a different batch script in the foreach loop pointing to files to be uploaded and FTP servers. I would then call this batch script using system or passthru? The theory seems right, but my lack of experience is causing the practise to suffer!!
Any help would be much appreciated!!
Many thanks in advance
Using FTP effectively
Moderator: General Moderators