NYCPHP Meetup

NYPHP.org

[nycphp-talk] upload file to remote server via form

Stephen Musgrave stephen at musgrave.org
Mon Feb 9 10:38:31 EST 2004


hello LIST >>

i currently have a functioning script that allows the visitor to the web
site to fill out a form, select a file and upload all of the contents to the
server.  the text goes into a database and the file to the file system.

now the script needs to have the ability to send that file to not just the
local file system but remote file systems as well.

it doesn't look like move_uploaded_file() can get the job done, only
allowing you to move the file out of the tmp directory and to the local file
system.

then there's the idea of first using move_uploaded_file() and then using
ftp_put() to get it over to the other server.  but that doesn't seem too
elegant and i'm wondering if there's a slicker way.

i looked at the PEAR package page for HTTP_Upload and it doesn't seem to
offer this kind of support.  I did a quick search on PHP Classes as well and
it doesn't seem to offer a solution either.

any ideas?  approaches?

thanks:  STEPHEN.

] http://stephen.musgrave.org/


 




More information about the talk mailing list