|
|
downloading mp3 questions HELP!
|
|
|
|
Fresh-Faced Recruit
Join Date: Oct 2003
Location: Toronto, Canada
Status:
Offline
|
|
i'm designing a small web site for my brother and need a little web design mp3 related advice.
I would like people to click on a link and download the mp3 - but right now if i link to the mp3.. it opens a new window and plays it in quicktime.
can anyone help me get my desired result of having a user click on a song and have the mp3 downloaded to their computer.
i'm sure there's a really simple line of html i just am not adding!
thanks for any help in advance.....
emalen
|
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Apr 2003
Location: SoCal
Status:
Offline
|
|
How 'bout zipping the file?
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status:
Offline
|
|
Originally posted by emalen:
i'm designing a small web site for my brother and need a little web design mp3 related advice.
I would like people to click on a link and download the mp3 - but right now if i link to the mp3.. it opens a new window and plays it in quicktime.
can anyone help me get my desired result of having a user click on a song and have the mp3 downloaded to their computer.
i'm sure there's a really simple line of html i just am not adding!
thanks for any help in advance.....
emalen
You need server-side scripting so you can modify the headers information and force the browser to download rather than process the file.
Do you have that on your hosting package?
|
Computer thez nohhh...
|
|
|
|
|
|
|
|
Fresh-Faced Recruit
Join Date: Oct 2003
Location: Toronto, Canada
Status:
Offline
|
|
Originally posted by Simon Mundy:
You need server-side scripting so you can modify the headers information and force the browser to download rather than process the file.
Do you have that on your hosting package?
How do i know if i have server-side scripting..i do have a cgi - bin... i can do php.... is there a specific name for 'server-side scripting'
i doubt you'll have heard of it, but my server is with digitalspace.net
thanks for your help,
emalen
|
|
|
|
|
|
|
|
|
Mac Enthusiast
Join Date: Oct 2001
Status:
Offline
|
|
Heres some php headers for ya...
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=" . basename($theSongPath) . ";");
header("Content-Transfer-Encoding: binary");
header("Content-Length: ". filesize($theSongPath));
|
3R1C
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|