Thanks for all responses!
I'm still curious about how to get user input, though.
The script below works for downloading a file from my (here: local) ftp-host to my local hd.
Instead of using the var $local_file, I would like to select destination in a pop-up window.
I think it can be done using header-funktions, but I don't know how.
Does anyone know what I need to add to my script to get the destination from the user?
<?
$ftp_server = "localhost";
$username = "anonymous";
$password = "";
$local_file = "C:\local_dir\local_file.txt";
$remote_file = "remote_file.txt";
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $username, $password);
if ((!$conn_id) || (!$login_result))
die;
else {
echo "Connected to $ftp_server, for user $username<br>\n";
if (ftp_chdir($conn_id, "remote_dir"))
ftp_get ($conn_id, $local_file, $remote_file, "FTP_BINARY");
}
ftp_quit($conn_id);
?>