RE: [PHP] serving up blobs for download

From: Date: Mon, 10 Jul 2000 05:33:37 +0000
Subject: RE: [PHP] serving up blobs for download
Groups: php.general 
Request: Send a blank email to php-general+get-5675@lists.php.net to get a copy of this message
Try looking at this : How to let a user download a picture by clicking on it instead of needing to right click and Save-As. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1562 You can use the general idea to do what you want. IMHO you are simply missing some headers IE expects cause this works great for me with both IE and NN. Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. > -----Original Message----- > From: Rob Montgomery [mailto:Robert.L.Montgomery@Home.com] > Sent: Sunday, July 09, 2000 5:37 AM > To: php-general@lists.php.net > Subject: [PHP] serving up blobs for download > > > This isnt exactly a PHP question, but... > > I want users to be able to download (not view with a viewer) > pdf files which I have stored as blobs in MySQL, so the php > script reads the blob into a variable, then does this: > > header("content-type: application/octet-stream"); > header("content-disposition: filename=$filename"); > echo $blob; > > With Netscape, this works great, the file save box opens and > the filename to save as defaults to my variable $filename. > > The problem is that IE thinks it should be able to find a > program to "view" the content-type of application/octet-stream. > Netscape defaults to downloading unknown types, IE just gets > confused. > > Does anyone know how to handle that problem? Is there some > other content-type which is specifically used for downloading? > > Thanks, > Rob > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.general (#5675) next »