I am trying to download PHP buffer output at the client's end. I am not interested in writing the output content to a file on the server and then allowing the download. I have checked my variable output by printing it on the browser. Since the buffer is supposed to be downloaded at the client's end as a file, where should I specify the file name?
<?php
$file=$_POST['file'];
header('Content-Description: File Transfer');
header('Content-Type: application/x-java-jnlp-file');
ob_clean();
flush();
readfile($file);
?>
~