Fwd: [PHP] send a file or stream
| From: | Rafael Mora | Date: | Wed, 30 Aug 2006 03:11:50 +0000 |
| Subject: | Fwd: [PHP] send a file or stream | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-241205@lists.php.net to get a copy of this message | ||
---------- Forwarded message ----------
From: Rafael Mora <moraloco@gmail.com>
Date: Aug 29, 2006 11:09 PM
Subject: Re: [PHP] send a file or stream
To: Peter Lauri <lists@dwsasia.com>
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 <lists@dwsasia.com> wrote:
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: <?php header("Content-Type: application/octet-stream"); readfile("path_to_compressed_file"); ?> /Peter -----Original Message----- From: Rafael Mora [mailto:moraloco@gmail.com] 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 to the http request?? Rafa