[Solved] Status message before entire page load
Posted: Fri Mar 04, 2005 4:09 pm
I have a situation where users will be uploading files to our codification system here and some of them will then be uploaded to our streaming server (offiste) using ftp. Some of these files are friggin' ginormous so I would like to indicate to the users half way through that their file is still being worked on (as soon as the upload is complete to our server and prior to the upload to the offsite streaming server).
I tried the code below, but it doesn't display anythign until the whole process is done. I'm thinking I need some kind of ob_ something or other here, but not sure what exactly...please advise:
Burr
I tried the code below, but it doesn't display anythign until the whole process is done. I'm thinking I need some kind of ob_ something or other here, but not sure what exactly...please advise:
thanks...<?if(isset($message)){ echo "<div class=\"red\" align=\"center\">".$message."</div>"; } else {
if($initftp){
echo "<span id=\"rmftp\">Your file has been uploaded to the LearningPathways server, now uploading to the PlayStream server....please wait</span>";
$conn_id = ftp_connect("ftp.ftpserver.com")
or die("could not connect to playstream.com");
$login_result = ftp_login($conn_id, "myUser", "myPass")
or die("could not log in to playstream.com");
$upload = ftp_put($conn_id, "lp/".$_FILES["bob"]["name"], "datafiles/".$dir.$_FILES["bob"]["name"], FTP_BINARY)
or die("could not upload to playstream.com");
ftp_close($conn_id);
echo "<script>
document.getElementById('rmftp').innerHTML = \"Upload Complete<br>\";
</script>";
} // end if for need to ftp rm files to playstream server...burrito
?>
Burr