Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
Явно имаш някакъв плеър, който ти пуска директно песента, ако си с убунту сигурно е това. Опитай с php.ljuljana каза:така съм о направила, но ми тръгва песента, а не тегленето
<?php
$file = $_GET["file"];
$extensions = array("mp3");//позволени типове
$extension_file = end(explode(".",$file));
$extension_file = strtolower($extension_file);
if(!in_array($extension_file,$extensions)){
echo "Непозволен тип файл";
exit;
}
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/mp3');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
?>