Hi all!
Couldn't you help me?
I want to store audio files in mysql database and to let users to download the files just from there.
=====
1) Here is the link to audio file on the web page (I've even removed the parameter of file needed - ?the_file_id=6 - to clarify the problem):
<a href="download.php">[audio file]</a>
2) Here is the source from download.php:
header('Content-Type: '.$file['type']);
header('Content-Disposition: ; Filename='.$file['filename']);
header('Content-Length: '.$file['size']);
echo $file['data'];
exit();
=====
When the user clicks the link, the Open/Save dialog appears on the screen.
Save function is working.
Open function is working if the file format is MIDI and then Winamp plays the file.
But if the file format is MP3 then Realplayer installed on user's pc says that "Connection to server has timed out".
=====
I would like to make the script to work like the link would be to mp3 file itself:
<a href="file.mp3">[audio file]</a>
In this case Realplayer connects, buffers the file and plays it.
=====
What headers or something else should I use to solve this problem?
Thanks a lot.