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 [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
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 <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
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
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to