i got this script posted by Shannon Cross on this forum
header ( "Content-Type: application/octet-stream");
header ( "Content-Length: ".filesize($file));
header ( "Content-Disposition: attachment; filename=$file");
readfile($file);
if this is, for example, in a filename called "download.php", when i hit the link to download a file (the filename is posted to this page) the "save as" dialog box displays "download.php" as its filename. if you replace that name by the correct one it works right. i mean, it really downloads the file you asked it to download, but i want it to display and save as the correct filename (this is the name of the file i'm downloading)