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! Link to comment https://forums.phpfreaks.com/topic/57735-progress-bar-during-ftp-uploads/ 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 Link to comment https://forums.phpfreaks.com/topic/57735-progress-bar-during-ftp-uploads/#findComment-286015 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. Link to comment https://forums.phpfreaks.com/topic/57735-progress-bar-during-ftp-uploads/#findComment-286034 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 Link to comment https://forums.phpfreaks.com/topic/57735-progress-bar-during-ftp-uploads/#findComment-286087 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? Link to comment https://forums.phpfreaks.com/topic/57735-progress-bar-during-ftp-uploads/#findComment-286147 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.. Link to comment https://forums.phpfreaks.com/topic/57735-progress-bar-during-ftp-uploads/#findComment-286161 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.