SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Guru Ize's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Forcing bulk download

    Hi guys,

    I'm working on an online music library where people can download my client's music.

    Users can stuff their shopping cart with up to 5 mp3s in a row. During the signout process, they're given the chance to download either one zip-file containing their selection (no clue how to do this, still working on it, hints are welcome), or downloading the mp3s as five seperate files.

    Focusing on the latter, what would be the best approach here? Currently it involves Javascript to open five windows containing my mp3.inc.php?id='blah', but
    a) it involves Javascript, users may have turned this off,
    b) it opens five empty, completely useless browser windows
    c) it's unprofessional.

    What would be a better way to serve users five "save as" prompts in a row?

  2. #2
    SitePoint Wizard TheRedDevil's Avatar
    Join Date
    Sep 2004
    Location
    Norway
    Posts
    1,198
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)
    It would look more professional if you do not "force" them to download all the mp3's at once.

    Would it be possible to have a download page, then offer a download key for each mp3. That way the user would download them when he/she decired.
    Of course you would still offer a "complete" zip file and single files.

    One thing to think on is that if you force them to download five files at once, it makes the risk higher for that the customer will need to redownload all files if he gets disconnected. It puts more pressure on your server as you should allow five downloads for each user at the same time (if you put them on wait it might cause problems with some browsers or the users not understanding how it works and closing the windows).

  3. #3
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    SitePoint Guru Ize's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by TheRedDevil
    It would look more professional if you do not "force" them to download all the mp3's at once.

    Would it be possible to have a download page, then offer a download key for each mp3. That way the user would download them when he/she decired.
    Of course you would still offer a "complete" zip file and single files.

    One thing to think on is that if you force them to download five files at once, it makes the risk higher for that the customer will need to redownload all files if he gets disconnected. It puts more pressure on your server as you should allow five downloads for each user at the same time (if you put them on wait it might cause problems with some browsers or the users not understanding how it works and closing the windows).
    Yeah you're probably right.
    I was trying to do this in as few clicks as possible, bacause our audience will use this music for tv shows and is mainly in a big hurry, downloading in the back of some set.

    But again, I think you're right

  5. #5
    SitePoint Guru Ize's Avatar
    Join Date
    Nov 2005
    Location
    The Netherlands
    Posts
    808
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by clamcrusher
    Not a big fan of PEAR. but thanks, I will take a look at that

  6. #6
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I once had to make an entire website available for download in a single zip. I then used linux zip command and called it from php using backticks, then just point to the result zip file.

  7. #7
    Always learning kigoobe's Avatar
    Join Date
    May 2004
    Location
    Paris
    Posts
    1,565
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Personally, I would tell that you make a page with a list of the stuffs to download + a checkbox associated with each them. Users can thus choose which or how many mp3s they want to download (thus no need of javascript) they can go to the next page (confirmation page) where you can include the download link. You can choose here for 1 or multiple zip files (I would go for one combined one though, = less work for the users).

    Check :
    1. http://www.zend.com/zend/spotlight/c...zip-files1.php
    2. http://www.zend.com/zend/spotlight/c...zip-files2.php
    3. http://www.php.net/zip
    4. http://www.granthinkson.com/?p=19

    Cheers.

  8. #8
    SitePoint Enthusiast Riks's Avatar
    Join Date
    Mar 2006
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can make a player, so visitor can hear the songs and then decide which to download with a near link. You don't have to use .zips if you don't want, you can force to download using some PHP:

    http://www.sometricks.com/2006/04/23...he-web-browser


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •