Re: sending PDF to the user (www)
| From: | Richard Lynch | Date: | Fri, 14 Sep 2001 05:23:16 +0000 |
| Subject: | Re: sending PDF to the user (www) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-67318@lists.php.net to get a copy of this message | ||
Add the filename to the end of the URL that they are getting.
It will look real weird, but will work for some browser versions.
I think there may also be two different forms of Content-disposition: for IE
versus Netscape.
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: George Pitcher <fmdev@yahoo.co.uk>
Newsgroups: php.general
To: <php-general@lists.php.net>; <pdflib@yahoogroups.com>
Sent: Thursday, September 13, 2001 10:24 AM
Subject: sending PDF to the user (www)
> Hi all,
>
> I am using Lasso to authenticate user access to PDF files with the actual
> delivery being handled by PHP.
>
> I can download the PDF by clicking a 'submit' button. However, in IE or
> Netscape, it puts it into the browser with the name of the php script as
the
> filename. I would like the filename to be the one the file lives with
> normally. Can this be done?
>
> Also, I would like it to be downloaded to the user's computer without
> opening in the browser. Any suggestions.
>
> My coding in php is:
>
> <?php
> $fp1 = "D:\\Pdf\\" . $fp;
> $len = filesize($fp1);
> header("Content-type: application/pdf");
> header("Content-Disposition: attachment; filename=$fp1");
> header("Content-Length: $len");
> readfile($fp1);
> ?>
>
> Any suggestions?
>
> George Pitcher
> Edinburgh
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>