das is mein download script:
PHP-Code:
include(PATH_INC . "db_connect.inc.php");
$db_query = "SELECT * FROM dltitels WHERE dlTitelID = '" . $dlTitelID . "'";
$db_result = mysql_query($db_query, $db_connect) or die(mysql_error());
$dl_data = mysql_fetch_array($db_result, MYSQL_ASSOC);
$db_query = "SELECT * FROM mime WHERE mimeExt = '" . $dl_data["dlTitelFileExt"] . "'";
$db_result = mysql_query($db_query, $db_connect) or die(mysql_error());
$mime_data = mysql_fetch_array($db_result, MYSQL_ASSOC);
mysql_close($db_connect);
header("Content-type: " . $mime_data["mimeTyp"]);
header("Content-Disposition: attachment; filename=" . $dl_data["dlTitelFileName"] . "." . $dl_data["dlTitelFileExt"]);
readfile($dlTitelID);
Kommentar