X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id B8D7ED1B545 for ; Tue, 28 Oct 2003 00:02:33 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 58258-06 for ; Mon, 27 Oct 2003 20:02:04 -0400 (AST) Received: from smtp-send.myrealbox.com (smtp-send.myrealbox.com [192.108.102.143]) by svr1.postgresql.org (Postfix) with ESMTP id B1133D1B4EF for ; Mon, 27 Oct 2003 20:02:01 -0400 (AST) Received: from myrealbox.com grzm@smtp-send.myrealbox.com [218.46.62.207] by smtp-send.myrealbox.com with NetMail SMTP Agent $Revision: 3.43 $ on Novell NetWare; Mon, 27 Oct 2003 17:01:55 -0700 Date: Tue, 28 Oct 2003 09:01:55 +0900 Subject: Re: Saving result to file for download Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) From: Michael Glaesemann To: pgsql-php@postgresql.org Content-Transfer-Encoding: 7bit In-Reply-To: <200310272056.28937.skoot@qi.pl> Message-Id: X-Mailer: Apple Mail (2.552) X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/31 X-Sequence-Number: 2392 Hi M.P. On Tuesday, Oct 28, 2003, at 04:56 Asia/Tokyo, Mariusz Pekala wrote: > > Why have you decided to store results in a file? Is that file to be > really > big? or takes long to prepare? Actually the file is pretty small (less than 8K) and is pretty quick to make (less than 2 seconds). I just didn't know how to do it any other way. > Maybe generating the file 'on the fly' would be easier: > > 1) Provide a link to a script that generates the file > (eg: get file here > > 2) The script "file.php" sets the content type header to text/plain > and just > outputs the result of a query. I am not sure how to set HTTP header on > Your > webserver (with apache there is a PHP function header(string) ) This sounds like *exactly* what I am after. I'll give it a try! Thanks for taking the time to respond. I knew there should be a better way but didn't know where to even start looking. I really appreciate your help. Michael