Re: [PHP] send a file or stream

2006-08-31 Thread Curt Zirzow
On 8/29/06, Rafael Mora [EMAIL PROTECTED] wrote: Hi! i want to send a file or output stream in a .php, but first compress it, I tryed the example to compress files but how do i do to send as answer to the http request?? Unlike my recent posts, this could be a candidate for using ob_* There

Re: [PHP] send a file or stream

2006-08-31 Thread Rafael Mora
Thank you very much Curt!, I'm tests right now with this. The client is not a web browser, it is an application that calls the .php file with $_GET params, and the app waits to receive the file compressed, this is the way I want it to work! I'll let u know about this. But anyway thank you Rafa

Re: [PHP] send a file or stream

2006-08-30 Thread Rafael Mora
To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] send a file or stream Ok it works, but it returns me the same .php file, not the one I am creating On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote: You need to make sure that you are not outputting ANYTHING before you do this. I

RE: [PHP] send a file or stream

2006-08-30 Thread Peter Lauri
:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 8:00 PM To: php-general@lists.php.net Subject: Re: [PHP] send a file or stream Hi!! Well it works now, but with another issue, when I download it, it says that it size is 0 bytes!! i fwrite the file in a while, is it correct? header()... while

Re: [PHP] send a file or stream

2006-08-30 Thread Rafael Mora
below readfile() without any argument? So that you are actually downloading something empty? :) /Peter -Original Message- From: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 8:00 PM To: php-general@lists.php.net Subject: Re: [PHP] send a file or stream Hi!! Well

RE: [PHP] send a file or stream

2006-08-30 Thread Peter Lauri
(); -Original Message- From: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Thursday, August 31, 2006 1:25 AM To: Peter Lauri Cc: php-general Subject: Re: [PHP] send a file or stream I can download it, but when I see the file I downloaded has 0 bytes, and I have readfile(stations.zip); On 8/30/06

[PHP] send a file or stream

2006-08-29 Thread Rafael Mora
Hi! i want to send a file or output stream in a .php, but first compress it, I tryed the example to compress files but how do i do to send as answer to the http request?? Rafa

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
); readfile(path_to_compressed_file); ? /Peter -Original Message- From: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 2:34 AM To: php-general@lists.php.net Subject: [PHP] send a file or stream Hi! i want to send a file or output stream in a .php, but first compress

Fwd: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora
-- Forwarded message -- From: Rafael Mora [EMAIL PROTECTED] Date: Aug 29, 2006 11:09 PM Subject: Re: [PHP] send a file or stream To: Peter Lauri [EMAIL PROTECTED] 1. A user sends a request to your server to get a compressed file 2. You compress the file on the server 3. I want

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 2:34 AM To: php-general@lists.php.net Subject: [PHP] send a file or stream Hi! i want to send a file or output stream in a .php, but first compress it, I tryed the example to compress files but how do i do to send as answer

Re: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora
[mailto:[EMAIL PROTECTED] *Sent:* Wednesday, August 30, 2006 10:10 AM *To:* Peter Lauri *Subject:* Re: [PHP] send a file or stream 1. A user sends a request to your server to get a compressed file 2. You compress the file on the server 3. I want to send back the file to the user On 8/29/06

Re: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora
To: Peter Lauri Subject: Re: [PHP] send a file or stream 1. A user sends a request to your server to get a compressed file 2. You compress the file on the server 3. I want to send back the file to the user On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote: Do you mean the following: 1. A user

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
it as an octet-stream. /Peter _ From: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 10:25 AM To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] send a file or stream I test it and gave me this: xœ ÉÈ,V¢D…'Ôâ=®(??/§C0/¿D!1O!3· ¿¨$1¯D¡¸¤(3/] LÖ

Re: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora
Subject: Re: [PHP] send a file or stream I test it and gave me this: xœ ÉÈ,V¢D…'Ôâ=(r)(??/§C0/¿D!1O!3· ¿¨$1¯D¡¸¤(3/] LÖ‑ so the user should read that?? this is my code: ?php $params = array('level' = 6, 'window' = 15, 'memory' = 9); $texto_original = This is a test.\nThis is only a test.\nThis

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
To: Peter Lauri Cc: php-general@lists.php.net Subject: Re: [PHP] send a file or stream Ok it works, but it returns me the same .php file, not the one I am creating On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote: You need to make sure that you are not outputting ANYTHING before you do this. I