Re: popping up download dialog box
| From: | Curt Zirzow | Date: | Fri, 18 Jul 2003 13:37:41 +0000 |
| Subject: | Re: popping up download dialog box | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-155761@lists.php.net to get a copy of this message | ||
Binay Agarwal <binay@m-web.com> wrote:
> Hi every body !
>
> I am writing a script which pops up download dialog box on click of a Link.
>
> Headers i m sending out for downloading jpegs are:
>
> header("Cache-control: private");
> header("Content-Type: image/jpeg");
> header("Content-Type: application/octet-stream");
> header("Content-Length: $size");
> header("Content-Disposition: attachment; filename=$fname");
> header("Content-Transfer-Encoding: binary");
> readfile($fname);
>
> All these work well in MSIE 5.0+ and Netscape 4.7+ . But on Mac I.E its not popping up the
> dialog box rather it opens up the jpg file in the browser window. I don know where am i doing wrong.
> Please suggest me . I cracked my mind for hours but in vain. So please help me out.
No matter what you do you cant guarantee that the pop-up box, it all
depends on how the client's browswer software wants to do with that
paticular mime-type.
have you tried sending out something like just to see something unknown
forces it to open:
header("Content-Type: application/makeupyourown");
Curt.
--