Pro binarni soubory to delam cca takhle
Kód:
<?php
include "connection.php";
MySQL_Query("UPDATE data SET download=download+1 WHERE id=".$_GET[DataId]);
header("Content-type: octet/stream");
header("Content-Disposition: attachment; filename=".$_GET[filename]);
readfile("data/".$_GET[filename]);
?>
Pro textaky je zmenim hlavicky na
Kód:
header("Content-type: text/plain");
header("Content-Disposition: attachment; filename=".$_GET[filename]);
I kdyz tech mime typu je nekolik dost podobny a u kazdeho dela kazdy prohlizec neco jineho :/ Ale tohle co jsem postl jsem pokusy zjistil jako nejvic kompatibilni se vsemi