OK Folks,
here is a solution i got from this
discussion.
~Tam
<pre>
--snip--
<script language="PHP">
// Start an buffer-object to prevent output BEFORE sending headers
ob_start();
// get the environment: Querystring
$qstring = explode("&",getenv("QUERY_STRING"));
// split 1st parameter into $command and $file
list($command,$file) = split("=", $qstring[0]);
// if the $command was "send" then send the $file
if ( strcmp($command,"send")==0)
{
// get the Filename without path
$fn = basename($file);
// Set the Content-Type
Header("Content-Type: application/octet-stream");
// Set the filename the user should be prompted for download
Header("Content-Disposition: attachment; filename=$fn");
// read and stream the file to the user
readfile($file);
// exit the programm
exit();
}
else
{
// proceed the side here
}
</script>
-- snip--
</pre>