create entry */ if (empty($row)) { $q = 'INSERT INTO download_count VALUES ('.$id.', 0, YEAR(CURDATE()), MONTH(CURDATE()))'; $result = mysql_query($q); } $result = mysql_query("UPDATE download_count SET downloads=downloads+1 WHERE id='".$id."' and year=YEAR(CURDATE()) and month = MONTH(CURDATE())"); /* header('Content-type: application/octet-stream ; name="'.$fileLocal.'"'); @header('Content-type: application/octet-stream'); @header('Content-Disposition: attachment;filename="'.$fileLocal.'"'); @header("Content-type: application/force-download"); @header("Content-Disposition: attachment; filename=".$fileLocal); header("Cache-control: private"); // another fix for IE header("Accept-Ranges: bytes"); header("Content-Type: application/octet-stream"); header("Content-Length: ".filesize($file)); header("Content-Disposition: attachment; filename=\"".$fileLocal."\""); header('Content-Transfer-Encoding: binary'); if (!@readfile($file)) { // an error occured and file was not downloaded! } else { // download successful! } */ /* header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); header("Content-Type: application/force-download"); header("Content-Length: ".filesize($file)); header("Content-Disposition: attachment; filename=\"".$fileLocal."\""); // Download file $fn=fopen($file, "rb"); fpassthru($fn); */ echo " "; } } ?>