Pro binarni soubory to delam cca takhle
Kód:
<?php
include "connection.php";
MySQL_Query&#40;"UPDATE data SET download=download+1 WHERE id=".$_GET&#91;DataId&#93;&#41;;

header&#40;"Content-type&#58; octet/stream"&#41;;
header&#40;"Content-Disposition&#58; attachment; filename=".$_GET&#91;filename&#93;&#41;;

readfile&#40;"data/".$_GET&#91;filename&#93;&#41;;

?>
Pro textaky je zmenim hlavicky na

Kód:
header&#40;"Content-type&#58; text/plain"&#41;;
header&#40;"Content-Disposition&#58; attachment; filename=".$_GET&#91;filename&#93;&#41;;
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