Page 1 of 1

customising a download box

Posted: Wed Jul 27, 2005 10:24 am
by hame22
Hi all

I have produced a page that starts a download of a PDF. However when the download box opens it has the option of opening the file.
What i want to do is force the user into saving onto their computer so i really would like to remove the "open" button.

Is this possible?

Posted: Wed Jul 27, 2005 10:52 am
by Burrito
look at header() you should.

pdfs, are their own beasts though, certain you can force them to d/l a pdf I am not.

Code: Select all

header("Content-Description: File Transfer");
header("Content-Type: application/pdf");
header("Content-Disposition: attachment; filename=".$filename_string);

Posted: Wed Jul 27, 2005 10:54 am
by hame22
yeah i have something similar;

Code: Select all

header (&quote;Content-Type: application/octet-stream&quote;);
header (&quote;Content-Type: application/download&quote;);
header(&quote;Content-Disposition: attachment; filename=$file&quote;);
header(&quote;Content-Length: $size&quote;);
bt is it possiible to customise the download box so there is just a save button?

Posted: Wed Jul 27, 2005 10:58 am
by Burrito
referring to customizing the firefox or IE dialogue box are you?

If you are, possible to do that it is not...

Posted: Thu Jul 28, 2005 3:04 am
by hame22
either but both preferably!!