Code: Select all
header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header('Content-Length: ' . filesize($file));
header('Content-Disposition: attachment; filename=' . basename($file));
readfile($file);
$sql_query_mark_download = "UPDATE `videofiles` SET `downloaded`='1' WHERE `id` = '" . $_REQUEST['did'] . "'";
mysql_query($sql_query_mark_download) or die(mysql_error());Thanks