Re: Download multiple sound files?
| From: | Jochem Maas | Date: | Fri, 13 Apr 2007 11:09:08 +0000 |
| Subject: | Re: Download multiple sound files? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-252854@lists.php.net to get a copy of this message | ||
Richard Lynch wrote:
> On Thu, April 12, 2007 11:15 am, Skip Evans wrote:
>> I have a need to allow a user to download multiple
>> sound files (mp3s, typically) from a single link.
>> I've been looking at various solutions via Google,
>> but have not seen one yet to do this.
>>
>> Can anyone point me in the right direction or give
>> me a lead on how this can be done?
>
> The HTTP protocol simply does not allow what you describe, at least
> not exactly -- There is one, and only one, download/response to one
> HTTP request.
>
> Some things you can consider:
>
> Use exec with tar (or zip or tar + gzip or whatever) to create a
> single file to download, with all the MP3s in it. This requires the
> user to use WinZip (or similar) to unpack the files.
>
> Create a "playlist" by concatenating a bunch of URLs to audio files.
basically a podcast.
imho if you offer a zip (maybe a self-extracting zip) *and* a podcast
of each set of mp3s you'd have a clean and user friendly interface ...
ofcourse you'll still have to convince the PHB, but that's your problem ;-).
> They won't have "downloads" of the audio files, unless they choose to
> use "wget -i" on that file, or something similar, but it does make for
> a nice way to group a bunch of audio files in a way that most users
> know how to deal with.
>
> You could, in theory, write some nasty JavaScript that would start a
> download, and a META tag to take them to the "next" file, so that the
> browser would essentially visit each file to be downloaded in turn,
> via JS and META tags. This would suck pretty bad, imho, but it's
> possible.
>