pranavbhat Posted June 29, 2007 Share Posted June 29, 2007 hi, I have written a code which successfully uploads files using FTP in PHP however, i want to show users a progress bar about the upload. Please tell me how do it do it. Thanks in advance. Cheers! Quote Link to comment Share on other sites More sharing options...
melvincr Posted June 29, 2007 Share Posted June 29, 2007 this is not possible in php, because php doesn't have access to the transfered raw data.. the only work around is to do combine it with a cgi script. if you google for it you'll find a lot of examples Quote Link to comment Share on other sites More sharing options...
pranavbhat Posted June 29, 2007 Author Share Posted June 29, 2007 hi, Can i use AJAX or a pop up window along with the non-blocking FTP code and do it...i was thinking that i already have the total file size(which can be easily found out) and i can use another PHP page to check the size of the file that is uploaded and then compare both the sizes to display the % completed. Quote Link to comment Share on other sites More sharing options...
melvincr Posted June 29, 2007 Share Posted June 29, 2007 as far as i know you cannot determine the size of a file during it's upload.. that's why all ajax/progress bar scripts use cgi or perl Quote Link to comment Share on other sites More sharing options...
pranavbhat Posted June 29, 2007 Author Share Posted June 29, 2007 hi, So, there is no other way without CGI/PERL i dont want to use CGI, thats why? Quote Link to comment Share on other sites More sharing options...
melvincr Posted June 29, 2007 Share Posted June 29, 2007 the other way is to use a flash uploader.. i'm still experimenting with them so i can't recommend you a specific one SWFObject (http://blog.deconcept.com/swfobject/) UFO (http://www.bobbyvandersluis.com/ufo/) jQuery (http://jquery.lukelutman.com/plugins/flash#activex) good thing is that it's easy to install and more or less to maintain.. bad thing is that you have to provide a standard upload form for the users who have no flash.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.