Hi,
First send
header("Content-Type: application/save");
header("Content-Disposition: filename=$filename");
header("Content-Length: $filesize");
then echo out the binary contents of the file.
Just ensure that there are no blank lines in the script that go to the browser. Otherwise the downloaded file will be corrupted.
If any help reqd, let me know.
Nilesh