Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Upload Progress with PHP and Perl

Status
Not open for further replies.

MSRez

Programmer
Dec 22, 2004
57
EU
Hi,

I'm trying to build an upload form that incorporates an upload progress status bar. I would like to do it using as much PHP as possible, using the basic idea of:

Perl handles the client to server file transfer and stores the file temporarily in a directory.
During the upload, PHP monitors the temporary directory and feeds back to the browser via JavaScript.
PHP handles the final once the upload is completed.

I have found several upload progress scripts but many of them have additional requirements, such as a PHP extension, or use too much Perl and aren't customisable.

If anyone can offer some help with this, I would really appreciate it.

Thanks
 
sounds plausible. what help do you need (from the php perspective)?
 
The difficult bit for me is the Perl functionality, as I haven't used Perl before.

I think what it needs to do is to submit the form via JavaScript, which connects to the Perl script and when it receives a certain response back JavaScript sends the form (which will have other data in it) to the PHP script.

I might be better off submitting this to the Perl forum, but since PHP is my basis I thought it would be better to post here in case Perl isn't the best route.
 
The problem with PHP is that the raw post data is only available after it is completed, while Perl has access to it during the upload. That is why so many solutions use Perl for upload bars. I saw a PHP-very-beta solution somewhere. The current stable versions of PHP do not support creating an upload bar.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)
 
Yes, that's what I am lead to believe as well. I have no problem using Perl since most servers support it, but I'd rather just keep its usage to a minimum so it only does what PHP can't.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top