I created a script that allows you to download a file from the server. My script works, but if the title contains stars and other characters, the file name does not work.
<?php
$path = 'myfile.mp3';
$name = '**filename.mp3';
header('Content-Description: File Transfer');
header("Content-Type: audio/mp3");
header("Content-Transfer-Encoding: binary");
header('Content-Disposition: attachment; filename="'.$name.'"'); //return __filename.mp3
readfile($path);
exit();
?>
How to repair this script to include other characters. Do you have any idea?