Forum Moderators: coopster

Message Too Old, No Replies

FTP upload files using PHP

Is this possible, is PHP ideal?

         

amdorsey

5:03 am on Apr 13, 2004 (gmt 0)

10+ Year Member



I am doing a site for a printing company who relies heavily on their clients uploading files to a ftp site. Instead of there clients using a ftp client (WS FTP Pro, Fetch, etc.) to upload files, they would like their clients to be able to upload files via their website. I have no problem implementing a user authentication script to get the client access to the page that uploads files, but I am not sure how to go about actually creating the script that allows file uploads to a FTP directory. Can PHP do this? Any Bugs? Or should I look into another language?

All I need is a simple field for the user to browse their local machine, select the file they wish to upload, and hit send. A status bar would be nice too! But not absolutely necessary.

Any ideas, PHP geniuses?

Robert Thivierge

5:40 am on Apr 13, 2004 (gmt 0)

10+ Year Member



You can make a form in HTML that will let the user upload a file. Then, the form-handler can be a PHP script. See [php.net...] for details. This is not FTP, but I think it accomplishes what you wish.

tomda

6:14 am on Apr 13, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you can. In fact, there are many way to create/copy/delete files using php4. Form seems the best option for your clients. But first, check if your server allows you playing around with directory files.

Tomda

WhosAWhata

9:25 pm on Apr 13, 2004 (gmt 0)

10+ Year Member



when in doubt, check php.net

PHP's FTP FUNCTIONS [php.net]

stevenmusumeche

9:42 pm on Apr 13, 2004 (gmt 0)

10+ Year Member



And if you can't get PHP's FTP functions to work, you can use cURL to do it as well :-)

WhosAWhata

1:58 am on Apr 14, 2004 (gmt 0)

10+ Year Member



ahh...
the ever popular cURL
it's saved me a few times