Re: [PHP] Printing to a buffer

2005-11-14 Thread Richard Lynch
On Sun, November 13, 2005 8:20 am, Marcus Bointon wrote: On 13 Nov 2005, at 00:17, Jasper Bryant-Greene wrote: seem to do that. I just tried application/text since I use application/pdf for other applications. Whatever it's giving the user the ability to do, it's probably because the

Re: [PHP] Printing to a buffer

2005-11-14 Thread Richard Lynch
On Sun, November 13, 2005 1:53 pm, Marcus Bointon wrote: On 13 Nov 2005, at 19:27, Jasper Bryant-Greene wrote: Many thanks! I did not know that MIME-Type. Change duly made! You're not suggesting that you actually set the MIME-Type to application/force-download, are you? I think he

Re: [PHP] Printing to a buffer

2005-11-14 Thread Richard Lynch
On Sun, November 13, 2005 4:55 pm, Todd Cary wrote: Because this was just a test of what will be many print lines. The original application used a file to hold the data and upon request by the user, it was emailed. But with my client's shared server, files cannot be opened...a pain. If you

Re: [PHP] Printing to a buffer

2005-11-14 Thread Marcus Bointon
On 14 Nov 2005, at 19:01, Richard Lynch wrote: It may not be my final choice whether they download or not, but if a browser doesn't treat: application/octet-stream as a download, and only as a download, then that browser is pretty broken. Letting the user configure their browser for that MIME

Re: [PHP] Printing to a buffer

2005-11-13 Thread Marcus Bointon
On 13 Nov 2005, at 00:17, Jasper Bryant-Greene wrote: seem to do that. I just tried application/text since I use application/pdf for other applications. Whatever it's giving the user the ability to do, it's probably because the browser doesn't recognise the (invalid) MIME-Type. Quite -

Re: [PHP] Printing to a buffer

2005-11-13 Thread Todd Cary
Marcus - Many thanks! I did not know that MIME-Type. Change duly made! Todd Marcus Bointon wrote: On 13 Nov 2005, at 00:17, Jasper Bryant-Greene wrote: seem to do that. I just tried application/text since I use application/pdf for other applications. Whatever it's giving the user

Re: [PHP] Printing to a buffer

2005-11-13 Thread Jasper Bryant-Greene
Todd Cary wrote: Marcus - Many thanks! I did not know that MIME-Type. Change duly made! You're not suggesting that you actually set the MIME-Type to application/force-download, are you? Todd Marcus Bointon wrote: On 13 Nov 2005, at 00:17, Jasper Bryant-Greene wrote: seem to do

Re: [PHP] Printing to a buffer

2005-11-13 Thread Marcus Bointon
On 13 Nov 2005, at 19:27, Jasper Bryant-Greene wrote: Many thanks! I did not know that MIME-Type. Change duly made! You're not suggesting that you actually set the MIME-Type to application/force-download, are you? I think he is. I've called the MIME-type police and they'll be round

Re: [PHP] Printing to a buffer

2005-11-13 Thread Todd Cary
Just before the police knocked at my door, I made a few changes! ? ob_start(); print This is a testbr; $buf = ob_get_contents(); $len = strlen($buf); ob_end_clean(); header(Content-type: text/plain); header(Content-Length: $len); header(Content-Disposition: attachment;

Re: [PHP] Printing to a buffer

2005-11-13 Thread M. Sokolewicz
call me stupid, but why don't you do it like this: $buf = This is a testbr; header(Content-type: text/plain); header(Content-Length: .strlen($buf)); header(Content-Disposition: attachment; filename=sfyc.html); echo $buf; ?? looks easier to me... no output buffering required... Todd Cary wrote:

Re: [PHP] Printing to a buffer

2005-11-13 Thread Todd Cary
Because this was just a test of what will be many print lines. The original application used a file to hold the data and upon request by the user, it was emailed. But with my client's shared server, files cannot be opened...a pain. If you have a better solution, I am open to other ideas.

[PHP] Printing to a buffer

2005-11-12 Thread Todd Cary
My client's new shared server does not allow printing to a file, so I want my print statement to print to a buffer, then I'll send it to the user via Headers. This does not work since print does no go to the buffer, or at least appears not to: I get the errors from the header statements; ?

Re: [PHP] Printing to a buffer

2005-11-12 Thread Jasper Bryant-Greene
Todd Cary wrote: My client's new shared server does not allow printing to a file, so I want my print statement to print to a buffer, then I'll send it to the user via Headers. This does not work since print does no go to the buffer, or at least appears not to: I get the errors from the header

RE: [PHP] Printing to a buffer

2005-11-12 Thread php-mail
-Original Message- From: Jasper Bryant-Greene [mailto:[EMAIL PROTECTED] [snip] application/text isn't a MIME-Type, is it? Do you mean text/plain? [/snip] Or maybe text/html? Sent: 12 November 2005 22:46 To: Todd Cary Cc: php-general@lists.php.net Subject: Re: [PHP] Printing

Re: [PHP] Printing to a buffer

2005-11-12 Thread Todd Cary
Yup! It was the missing parentheses! Works as planned. Many thanks The application/text gives the user the ability; text/plain does not seem to do that. I just tried application/text since I use application/pdf for other applications. Todd Jasper Bryant-Greene wrote: Todd Cary

Re: [PHP] Printing to a buffer

2005-11-12 Thread Jasper Bryant-Greene
Todd Cary wrote: Yup! It was the missing parentheses! Works as planned. Many thanks The application/text gives the user the ability; text/plain does not The ability to...? seem to do that. I just tried application/text since I use application/pdf for other applications. Whatever