Put file on FTP server using PHP

ftpmacPHPwebsite

I have an FTP server running on my home computer. I've built a super simple web interface for depositing files onto the server without the use of a native client using the HTML5 File API. I have the interface and code for choosing the file(s) completed. Now how must I actually go about posting the file to the FTP server on my home machine? Does the website need to be hosted on my home machine for me to deposit files to it, or can I establish a connection to my home computer server through a different web host?

Any explanation and/or coding recommendations would be greatly appreciated.

Best Answer

I think you are looking for the FTP put and get command. Go to the command line and use ftp.

FTP xyz.com

Then at the greater sign that comes up (after you login in and password) type

put /path/to/file/file.name

To download it (get it off the server) use get instead of put (or your web app). I think this is what you are after.

Related Question