We currently have a downloads page for our site, which lets registered users download from a separate server from our website. It checks to make sure a user is registered, and then allows them to download. Now, the hangup is, users can only get 1 file at a time, and they can't use ftp. It is HTTP only. I am looking for a way to have a window popup, or another method of queueing HTTP downloads, still using the authentication methods we use, but having it be in PHP if possible, so the user could queue up an entire show (Dave Matthews Band live audio files) and "set and forget", much like FTP.

Anyone have any thoughts on this?

www.antsmarching.org/music/downloads is the page in question (requires registration to view the filesystem, for reasons stated above)

Matthew Yette
matt@antsmarching.org

    Hi Matt

    On my site I have this at the bottom of the page to start the file downloading. No reason why you can't have hidden frames/iframes - 1 for each file which has been requested.

    <script language="JavaScript">
    window.location="/v2/download1/pcpmdemo.exe";
    </script>

    Even better though you could have php generate

    for ($cnter = 0; $cnter < $fileCnt; $cnter++)
    {
      echo "<IFRAME src='" . $serveFile[$cnter] . "' name='iContent$cnter' width='0' height='0' frameborder='0'></IFRAME>";
    }
    

    where $serveFile is the list of files the user has requested and $fileCnt is the number requested.

      ok, my only suggestion is to have a record placed in a db with the file, and user, so they can keep track, and have the user notify when the file is downloaded, removing the record

        Looks like I'm going to have to try writing this in C# or something, as I can't find anything like this in PHP.

          Ummm... what didn't work with my suggestion. PHP just generates html, as does C++ and php can cope with generating the html for multiple popups.

          what's your launch page look like. I imagined a list of files with check boxes beside them. The code would look at the variables passed and create a popup for each.

            Originally posted by sarahk
            Ummm... what didn't work with my suggestion. PHP just generates html, as does C++ and php can cope with generating the html for multiple popups.

            what's your launch page look like. I imagined a list of files with check boxes beside them. The code would look at the variables passed and create a popup for each.

            The attached image is the page where users can download from. The file listing is provided by an anti leech php page, within an inline frame. I see what you mean by your idea, but how does PHP know when one file is finished downloading so it can start the next? (Users can only d/l one at a time)

            Thanks for the reply - I appreciate it 🙂

              I thought the "one at a time" limit was somthing you were trying to get around. Do you have a business rule requiring this?

              From a very quick look at the gif this is how I'd run it.

              Show page with file names as hyperlinks. User clicks on file names and a form is submitted. Same page returns but this time it starts the download happening. User clicks on another filename and a form is submitted and the same page returns... only now we have 2 downloads happening. Most browsers will allow this.

              And no, hard to tell when one finishes, all sorts of calculations and ASSUMPTIONS.

                Write a Reply...