February 22nd, 2003, 08:21 AM
Download using FTP functions
Can somebody tell me how to copy a file from a server and place it to the client machine using FTP functions.
The ftp function of php "ftp_get()" does not really get the file from a server and put to the client machine. What it actually does is open an ftp connection and the file you want to copy from the server will be placed in the current directory of the server where the script resides instead of the client machine drive.
Let's consider that the client's OS would be Windows.
February 22nd, 2003, 04:02 PM
If you mean that you are on the server and you want to place a file on a client machine from the server, it can't be done. Unless the client machine is set up to function as an FTP server as well, then you can log on to the client and FTP the file to them.
The user must open an FTP connection to your server and down load the file themselves.
Of course, if someone knows if it can be done please let us know.