Cytat
if you want to have a link to an mp3 on your website, but don't want quicktime to load it, but rather download it to your machine, use this php script where $mp3name is the name of the mp3 without the .mp3 extension (do this to keep people from leeching mp3s from your site):
[php:1:05d886be69]<?php
header("Cache-control: private");
header("Content-Type: application/mp3");
header("Content-Disposition: attachment; filename=$mp3name.mp3");
?>[/php:1:05d886be69]
[php:1:05d886be69]<?php
header("Cache-control: private");
header("Content-Type: application/mp3");
header("Content-Disposition: attachment; filename=$mp3name.mp3");
?>[/php:1:05d886be69]
tak tez zrobilem, i wyrzuca poprawnie okno do zapisu pliku, nazwe ze zmiennej rozpoznaje, ale nie sciaga pliku tylko zapisuje mi na dysku plik o rozmiarze 0kb...
potem przeczytalem tez inne rozwiazania:
Cytat
If you want to force browsers to download the content and not to open it automaticaly, as a PDF or DOC files, use:
[php:1:05d886be69]<?php
header("Content-type: application/octet-stream");
// probowalem tez
header("Content-type: application/force-download");
//dodawalem tez
header("Content-Length: ".filesize("$mp3name.mp3"));
?>[/php:1:05d886be69]
[php:1:05d886be69]<?php
header("Content-type: application/octet-stream");
// probowalem tez
header("Content-type: application/force-download");
//dodawalem tez
header("Content-Length: ".filesize("$mp3name.mp3"));
?>[/php:1:05d886be69]
ale tez nic... caly czas pusty plik...
wie ktos moze czemu? czego brakuje ...