Re: [PHP] Download multiple sound files?
On Fri, April 13, 2007 6:09 am, Jochem Maas wrote: > 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 ;-). Actually, a playlist and a podcast are pretty different... I say this, having tried to wedge my daily playlist into a podcast format, and running into some fundamental roadblocks that I have yet to resolve in any reasonable fashion. Dunno which the OP really needs, mind you. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
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. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
On Thu, April 12, 2007 6:39 pm, Richard Davey wrote: > The protocol, while fine for most things, is not efficient. There is > no > way to batch-up messages for quicker transfer. Even today with our > 'super fast' connections if you go on holiday for two weeks (and DON'T > check email while away!), then come back and watch your mail client > chug > through download 4,000 odd messages as it has to LIST, RETR and DELE > each bloody one, you'll realise how shoddy POP3 really is. In the > 'past' > they could have been bundled into a single file, compressed and > streamed, a process that would produce far quicker results even today. Once upon a time, I had my Mac PPC 8100 desktop connected to my cable-modem, and Eudora checked email every hour, on the hour, and ran through a bunch of custom spam filters I had put into Eudora to help weed out the worst junk. This worked well, at first, but... When it got to the point that it was often spending almost half an hour downloading SPAM, just to delete it, I had to go and write a PHP script on the server that did the filtering, on the server. This was some time ago, and Eudora told me I was getting 10,000 emails per day, before I switched to my server-side filtering. (and my webhost added SpamAssassin soon after that) I have no idea how many emails are streaming in every day, and getting nuked by SpamAssassin, but I still use that PHP script to nuke some more of them before I ever get around to the browser-based filtering, which only kicks in when I login... One time, after a server upgrade (move) the cron jobs didn't get re-instated, and I couldn't even login to read email -- The webmail (squirrelmail) would just choke on its attempts to filter the box, until I reset up the cron job, and PHP nuked a bunch of spam for me. Here's the source of my PHP IMAP spam filtering code: http://l-i-e.com/imap/index.phps I ripped out most of my actual spam rules to keep the code example somewhat readable. I'm not saying it's the best-written code ever -- It was a quick hack to deal with an impossible situation where I couldn't read me email, but I've been using it for years. I also have it set up to filter email into the boxes for me, long before I log in, so I don't have to wait for squirrelmail to move all the PHP-General emails where they belong, in their own folder. :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
[EMAIL PROTECTED] wrote: And POP3 probably existed long before the old BBS', so it's not that things got LESS efficient, it's just that we didn't NEED to bundle bunches of emails together into a single file because of crappy dialup connections and crappy modems and the necessity of keeping transfers to quick bursts with some basic CRC checking to ensure file integrity. You might want to check your dates there. I was using more efficient email methods almost a *decade* before POP3 existed. The protocol, while fine for most things, is not efficient. There is no way to batch-up messages for quicker transfer. Even today with our 'super fast' connections if you go on holiday for two weeks (and DON'T check email while away!), then come back and watch your mail client chug through download 4,000 odd messages as it has to LIST, RETR and DELE each bloody one, you'll realise how shoddy POP3 really is. In the 'past' they could have been bundled into a single file, compressed and streamed, a process that would produce far quicker results even today. Not everything changes for the better. Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk "Never trust a computer you can't throw out of a window" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
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. 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. -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
Skip Evans wrote: Right, there is that, but I know the client is going to want the mp3s to land on the client's machine in individual mp3 files. Is there a way to link to the second, etc, next file in line after beginning the first? I can't think of a way to do this. Sort of. You could probably craft an evil web page that kicks off the MP3 download in an iframe, polls that frame for completion using Javascript, and when it's done start the next one. But that's evil, like I said earlier. From both usability and KISS points of view, zipping 'em is your best option. -Stut Stut wrote: 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? Zip 'em and ship 'em. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
Does this mean we need to start lobbying against connectionless protocols like HTTP so we can better download multiple files? hah And POP3 probably existed long before the old BBS', so it's not that things got LESS efficient, it's just that we didn't NEED to bundle bunches of emails together into a single file because of crappy dialup connections and crappy modems and the necessity of keeping transfers to quick bursts with some basic CRC checking to ensure file integrity. Now we're able to transfer things uncompressed fairly quickly and with some fairly decent assurance that it'll arrive un-borked. I assume hardware takes care of most of the error checking these days. Praise Cisco (among others). At any rate, the programs I mentioned before will allow you to download multiple files off of a website or queue up multiple links for downloading en masse (assuming the links go directly to the files and not a download page of some kind... or a download link that uses sessions or tokens or something that expire). So there are plenty of options for downloading multiple files via HTTP... just need a means to queue them. So all is not lost. Again, if you missed them: Download Acclerator Plus: http://www.speedbit.com/ http://www.download.com/3000-2071_4-10037157.html GetRight: http://www.getrite.com/ Go!Zilla: http://www.gozilla.com/ Firefox Extension: DownloadThemAll: http://www.downthemall.net/ https://addons.mozilla.org/en-US/firefox/addon/201 Firefox Extension: FlashGot (this looks like it does something similar): https://addons.mozilla.org/en-US/firefox/addon/220 Some of these are commercial products and some were good years ago but who knows how they are now, might be full of spyware for all I know (this is my disclaimer against potential suckage.. I havn't used any of these except DownloadThemAll recently so can't really vouch for what they are now). Anyway, stop lamenting the good old days.. there are solutions now to do what you want to do. I wouldn't be suprised if there was an email message 'bundler' so you didn't have to download emails one at a time via archaic POP3 too..hah Back to the OT and OP... doing this with PHP would take a little cleverness and probably isn't worth it. But might be a fun challenge and is certainly possible with enough elbow grease put into it. -TG Sysop: Hangar 18 BBS (410), 1992-1994 (give or take) http://www.bbsmates.com/viewbbs.aspx?id=80682 = = = Original message = = = Jim Moseby wrote: > I remember, way back when, transferring multiple files was simple. The good > ole days of ZModem. Maybe todays technology will catch up eventually. ;^) I doubt it :) Things were so much more optimised back then! I remember packaging all my mail up into QWK bundles, downloading it all in one go for offline reading, then packaging my responses up in the same way. So much more efficient than POP3 it's untrue. Ahh.. the good old BBS days. Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk "Never trust a computer you can't throw out of a window" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
Jim Moseby wrote: I remember, way back when, transferring multiple files was simple. The good ole days of ZModem. Maybe todays technology will catch up eventually. ;^) I doubt it :) Things were so much more optimised back then! I remember packaging all my mail up into QWK bundles, downloading it all in one go for offline reading, then packaging my responses up in the same way. So much more efficient than POP3 it's untrue. Ahh.. the good old BBS days. Cheers, Rich -- Zend Certified Engineer http://www.corephp.co.uk "Never trust a computer you can't throw out of a window" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Download multiple sound files?
> = = = Original message = = = > > Hey all, > > 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? > > Thanks! > Skip > I remember, way back when, transferring multiple files was simple. The good ole days of ZModem. Maybe todays technology will catch up eventually. ;^) JM -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
Hey all, Thanks for the good suggestions. I think Stut and TG here are on the right track with a zip file kind of thing. They should be able to handle that and the php/zip stuff looks good to. Much thanks! Skip [EMAIL PROTECTED] wrote: Stut beat me to it... downloading multiple files at once is probably best done with compressing them and just downloading the one file. You could possibly rig a situation where the user downloaded one file, then a certain number of seconds later, the page redirects to the next file to download... but that would be slow and not terribly efficient. Another option is to use a non-PHP solution. List all the links to the files they want to download and use a download manager like Download Accelerator Plus (DAP), GetRight, umm.. some "*zilla" program I believe did it, or something like the "DownloadThemAll!" Firefox extension. -TG = = = Original message = = = Hey all, 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? Thanks! Skip -- Skip Evans Big Sky Penguin, LLC 61 W Broadway Butte, Montana 59701 406-782-2240 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL development framework. http://phpenguin.bigskypenguin.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
Stut beat me to it... downloading multiple files at once is probably best done with compressing them and just downloading the one file. You could possibly rig a situation where the user downloaded one file, then a certain number of seconds later, the page redirects to the next file to download... but that would be slow and not terribly efficient. Another option is to use a non-PHP solution. List all the links to the files they want to download and use a download manager like Download Accelerator Plus (DAP), GetRight, umm.. some "*zilla" program I believe did it, or something like the "DownloadThemAll!" Firefox extension. -TG = = = Original message = = = Hey all, 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? Thanks! Skip -- Skip Evans Big Sky Penguin, LLC 61 W Broadway Butte, Montana 59701 406-782-2240 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ___ Sent by ePrompter, the premier email notification software. Free download at http://www.ePrompter.com. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
Skip Evans wrote: > Hey all, > > 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? php.net/zip in combination with a 'standard' download script. > > Thanks! > Skip > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
Hey, Right, there is that, but I know the client is going to want the mp3s to land on the client's machine in individual mp3 files. Is there a way to link to the second, etc, next file in line after beginning the first? I can't think of a way to do this. Skip Stut wrote: 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? Zip 'em and ship 'em. -Stut -- Skip Evans Big Sky Penguin, LLC 61 W Broadway Butte, Montana 59701 406-782-2240 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL development framework. http://phpenguin.bigskypenguin.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Download multiple sound files?
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? Zip 'em and ship 'em. -Stut -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php