At 18:45 13.02.2003, Petre Agenbag spoke out and said: --------------------[snip]-------------------- >But I am baffeled for the rest, ie, what to do on the download.ftp page. >First I tried the ftp_get() with the $file used as the local and remote >files, but it seems that that will not download the file to the client >machine, but rather to the server itself.
You need to "think" being the server - that is the server (on behalf of your script) downloads the file. >So, how can I have the file download to the client's machine ( ps, the >files are NOT inside a webfolder, so I cannot simply make links to them, >and yes, it is done for security reasons; basically I am trusting/using >vsftp's security instead of having to devise my own method..) You have two options: 1) Don't download the file yourself but give the user an ftp link after reading the directory. This seems impractical in your case since you need to log into the server. 2) Download the file to the server, then transmit it to the client's machine using an appropriate mime header: header('Content-Type: application/octet-stream'); This will have the browser give the user the "save as" dialog. -- >O Ernest E. Vogelsinger (\) ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php