...

View Full Version : Audio download links



---Beany---
04-19-2011, 06:55 PM
Hi peeps
I'm trying to sell digital Audio on my webpage using paypal to receive payments. This then will direct to a thank you page where the download can begin (I realise this isn't the most secure way of doing it since people can simply copy and share the download link, but this is another issue).

My main problem is when the link is clicked, instead of initiating a download, it opens a new page where the audio plays in the browser instead of downloading.
Is it because I need to zip it? If that's the case then what if my customers don't have unzipping software.
Thanks

Wojjie
04-19-2011, 07:12 PM
You need to tell the browser its an attachment/download, here is a link that shows a good example of what headers are needed, mainly the:


header("Content-Disposition: attachment; filename=\"".basename($filename)."\";" );

http://www.elouai.com/force-download.php

Other possibility is to set the content type to something that won't autoplay for the file type.

Or, the easiest would be just to zip them.

---Beany---
04-19-2011, 07:19 PM
Or, the easiest would be just to zip them.

Thanks, this is what I was thinking. But what if my customer doesn't have a unzip package?
Or are they pretty much standard with all pcs nowadays?

DanInMa
04-19-2011, 07:28 PM
windows has native .zip functionality as of windows xp sp3. there are many free programs online that can also handle zip files that you could refer to your users.

Wojjie
04-19-2011, 07:32 PM
Like DanInMa said, it is almost standard today.

There are newer technologies like gzip, bzip2 that not every machine has, but zip has been around for a long time.

---Beany---
04-19-2011, 07:40 PM
Okay thanks. I'll do that then.
I just don't like the thought of customers becoming frustrated having to download software is all.
Thanks :)

Wojjie
04-19-2011, 07:42 PM
You can always give them the link to the mp3 and tell them to right click and click save as as a back up plan.

---Beany---
04-19-2011, 08:05 PM
You can always give them the link to the mp3 and tell them to right click and click save as as a back up plan.

That's okay. Ill just go with the zip plan. I can always change it if customers are having trouble. Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum