I want to require a file to be downloaded upon the user visiting a web page with PHP. I think it has something to do with file_get_contents, but am not sure how
file_get_contents
try this:
header('Content-type: audio/mp3'); header('Content-disposition: attachment; filename=“'.$trackname'”'); readfile('folder name /'.$trackname); exit();