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 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-30 Thread Peter Lauri
readfile(); -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.

Re: [PHP] send a file or stream

2006-08-30 Thread Rafael Mora
oing what you do 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 fi

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
s DS! -Original Message- From: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 11:01 AM 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

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
ginal Message- From: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 11:01 AM 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

Re: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora
hp.net 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: 6, 'window' => 15, 'memory' => 9); $texto_original = "This is a test.\nThis is onl

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
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/]

Re: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora
("Content-Type: application/octet-stream"); readfile("stations.gzip"); On 8/29/06, Peter Lauri <[EMAIL PROTECTED]> wrote: Should do it then. if you know the path to the file :) _____ From: Rafael Mora [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 30, 2006 1

Re: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora
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

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
Should do it then. if you know the path to the file :) _ From: 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

RE: [PHP] send a file or stream

2006-08-29 Thread Peter Lauri
Do you mean the following: 1. A user sends a request to your server to get a compressed file 2. You compress the file on the server 3. You want to send back to compressed file to the server It is number 3 you asking for? In that case: /Peter -Original Message- From: Rafael Mora [mai