Okay; so what you're wanting is one of those pages where you get a screen saying something like 'Now downloading foobar.pdf' or whatever, and a moment later, a download dialogue pops up asking what to do with foobar.pdf?
The way that's commonly done (at, e.g., SourceForge) is for that notice page (which is an ordinary page with no unusual headers) to contain a <META> refresh tag (Google for meta refresh). The URL given in that tag - in your case - specifies a script to run that will (along with the application/octet-stream content-type) output the binary file data.
So when the browser goes to refresh the page as per the instructions given in the META tag, it will be hit with the downloaded file.
Needless to say, you will need some way of specifying which file is supposed to be downloaded. Seeing how SourceForge does it, it is to supply the name of the file in the URL's query string. Of couse, it doesn't have to be a file name, just as long as it is enough for the script to recognise what file is being requested.
In fact, even that might not be necessary. I haven't tried it, but I presume sessions will continue to work. When your user does whatever they do to request the download notice page, set a session variable to identify which file they're requesting. Then, the download script itself can look in that variable to see what is being asked for. Nothing special needs to be passed in the query string, because everything needed is already in the session data.