![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 407 Pomógł: 0 Dołączył: 24.10.2002 Skąd: warszawa Ostrzeżenie: (0%) ![]() ![]() |
manual mowi:
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] 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] ale tez nic... caly czas pusty plik... wie ktos moze czemu? czego brakuje ... |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 407 Pomógł: 0 Dołączył: 24.10.2002 Skąd: warszawa Ostrzeżenie: (0%) ![]() ![]() |
dzieki ze zworicles uwage... czasme czlowiek sie zapedzi w technologie a to glupoty robia kiksy (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
[php:1:d395abf869]<?php $mp=fopen("$mp3name.mp3", "rb"); fpassthru($mp); ?>[/php:1:d395abf869] zle podstawilem zmienne tu na dole (IMG:http://forum.php.pl/style_emoticons/default/rolleyes.gif) juz dziala, dzieki zz zainteresowanie, pozrawiam :wink: |
|
|
![]() ![]() |
![]() |
Aktualny czas: 2.10.2025 - 23:02 |