Re: Delete a file immediately after download

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shaun wrote:
Hi Marek,

Thanks for your reply, could you tell me how I would go about this please?


<?php

header('Content-type: text/csv');
header('Content-Disposition: attachment; filename="download.csv"');

/** Now you perform the MySQL query, DECODE the information and echo it
to the screen.  Hopefully this is actually in CSV format :) */

?>


"Marek Kilimajer" <lists@xxxxxxxxxxxxx> wrote in message news:42127AFF.4090705@xxxxxxxxxxxxxxxx

Shaun wrote:

Hi,

I have a database that contains encrypted data using Mysql function
ENCODE(). Certain users will be allowed to view this data and I will
allow them to download a CSV file contain the decrypted data using the
Mysql DECODE() function. However I don't want this file to be left on the
server, is there a way to ensure that the file is deleted immediately
after it has been downloaded?

Don't put the file to a file at all, simply output the right header and echo the content.


--
Teach a man to fish...

NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://www.php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
LAZY |
http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux