PHP Upload File to FTP Asynchronously

Howdy people,
  I've done plenty of uploading files to FTP servers with PHP, but only from my web host to the FTP server.  Is it possible to send a file straight from the browser to the FTP server?  Or more likely, start sending a file to the FTP server, while it's still being upload to the web server from the browser?

  I did some reading on ftp_nb_fput, and it almost seems like it would be possible for PHP to open the temporary file as it's being uploaded to the web server, and start sending it to the FTP server before it's done downloading.

  I'm not against using some JavaScript if that's needed.

- Sean
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

headzooAuthor Commented:
Oh yeah, I also don't care if I have to use some kind of cgi script to help out.
Well, if you're talking about uploading a file to your web server and having your web server send it to an FTP while you are STILL uploading it, I'm not sure that's really possible.  Even if it were, your server's upload speed is probably MUCH higher than the internet connection you're using (most cable and DSL lines are capped for upload speeds).  This means that if your web server was able to send the file as it was receiving it, it would likely run out of data to send before you finished uploading.

If you want to just open up an FTP connection in your web browser, just do this:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.