"Manuel Ritsch" <[EMAIL PROTECTED]> wrote in message
> Hey There
> I have a little question
> I'm making a page where you can download mp3's (hip hop and funk beats
> by myself) and i want, if you press on the
> link (<a href="yadayada.mp3">), that it doesn't start an internal audio
> player (like some configurations/browsers do), rather i want that the
> download dialog (like when you download .exe or .zip files) appears to
> the mp3 on your harddisk, can anyone give me a tip?
> Greets
> -- manu
Take a look at http://www.php.net/header, particularly the
Content-Disposition portion of it:

If you want the user to be prompted to save the data you are sending, such
as a generated PDF file, you can use the Content-Disposition header to
supply a recommended filename and force the browser to display the save
header("Content-type: application/pdf");
header("Content-Disposition: attachment; filename=downloaded.pdf");

/* ... output pdf file ... */

Note: There is a bug in Microsoft Internet Explorer 4.01 that prevents this
from working. There is no workaround. There is also a bug in Microsoft
Internet Explorer 5.5 that interferes with this, which can be resolved by
upgrading to Service Pack 2 or later.

You'll need to choose the correct content-type and filename of course.

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to