Hi
i am working on a music site project where i want to enforce a song to download.
Here is a snippet of code from songs.php:-
<a href="download.php?s_id=1021">title of the song</a>
<a href="download.php?s_id=1022">title of the song</a>
<a href="download.php?s_id=1023">title of the song</a>
Now if the user clicks on any song link in the songs.php he is directed to download.php page.
Here is the code of the download.php
$file_name = $_REQUEST['s_id'];
$file_name = '';
header('Content-type: audio/mp3');
header('Content-Disposition: attachment; filename="$file_name"');
readfile(' ');
?>
My Problems:-
1- How i can find out the relevant song through 's_id'. which i want to download.
(Should i have to run my database queries to find out that specific file.)
2-what to place in readfile('')