Announcement

Collapse
No announcement yet.

PHP Download Queue

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP Download Queue

    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?
    Matthew Yette
    [email protected]
    antsmarching.org - People in every direction

  • #2
    Originally posted by yetdog111
    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?
    you could probrably have a table in a db full of the files and location of it, and in it have a field that "being_downloaded" and have a simple 1 and 0, and then username downloading it.

    then check it with a php script, if it isnt being downloaded, download it, if it is, then we have another table for that.

    the queing table. this table lists the ques, by an id, with the userid and the downloadid. also there is a field if downloaded or not. you can run a select all where the downloaded="0" for not being downloaded, and the downloadid="whatever" for the download, and then order by ascending.

    i am a bit tired so this probrably doenst make much sense, if i wasnt i would try to make a schema for you to help. however that probrably wouldnt help as well

    Comment


    • #3
      Originally posted by corley
      you could probrably have a table in a db full of the files and location of it, and in it have a field that "being_downloaded" and have a simple 1 and 0, and then username downloading it.

      then check it with a php script, if it isnt being downloaded, download it, if it is, then we have another table for that.

      the queing table. this table lists the ques, by an id, with the userid and the downloadid. also there is a field if downloaded or not. you can run a select all where the downloaded="0" for not being downloaded, and the downloadid="whatever" for the download, and then order by ascending.

      i am a bit tired so this probrably doenst make much sense, if i wasnt i would try to make a schema for you to help. however that probrably wouldnt help as well
      No, what you say definitely makes sense. I guess I'd have to rewrite the way our system works to get something like this going. One key point that I find unanswered with your post is how does the app know when a download is finished, to move on to the next? I would say I am intermediate with PHP, so I'm not sure if it has the hooks to handle this. Basically the way it is right now, we have a custom anti-leech script which is basically a PHP-based filesystem app. It only allows authorized members in, and only to download one file at a time. Problem is, the files are quite large, and users would like to let it go overnight, but they can't.

      www.antsmarching.org/music/downloads is the area in question (sorry, I have it set up to require registration, so unless you feel like doing that, the link probably won't do you any good)

      Unfortunately it looks as if I'm going to have to rewrite the entire system, being that there are thousands of files on the download server, and its all just access w/ that filesystem script. Nothing as far as actual file by file listing is in the db. The only things that are in the database are the actual foldernames that contain all the individual audio files.
      Matthew Yette
      [email protected]
      antsmarching.org - People in every direction

      Comment


      • #4
        lemme research a way to see if there is some sort of check whetherthe download is done when i get to work tonight.

        there probrbaly is a way, i just never had to think about it

        Originally posted by yetdog111
        No, what you say definitely makes sense. I guess I'd have to rewrite the way our system works to get something like this going. One key point that I find unanswered with your post is how does the app know when a download is finished, to move on to the next? I would say I am intermediate with PHP, so I'm not sure if it has the hooks to handle this. Basically the way it is right now, we have a custom anti-leech script which is basically a PHP-based filesystem app. It only allows authorized members in, and only to download one file at a time. Problem is, the files are quite large, and users would like to let it go overnight, but they can't.

        www.antsmarching.org/music/downloads is the area in question (sorry, I have it set up to require registration, so unless you feel like doing that, the link probably won't do you any good)

        Unfortunately it looks as if I'm going to have to rewrite the entire system, being that there are thousands of files on the download server, and its all just access w/ that filesystem script. Nothing as far as actual file by file listing is in the db. The only things that are in the database are the actual foldernames that contain all the individual audio files.

        Comment


        • #5
          Originally posted by corley
          lemme research a way to see if there is some sort of check whetherthe download is done when i get to work tonight.

          there probrbaly is a way, i just never had to think about it
          Thanks so much Corley! I assume there is a way to have a file sent to a computer so that it automatically downloads, without the "save as, or open" dialog, as well? That would be necessary, otherwise the point of the queue system is kinda lost.
          Matthew Yette
          [email protected]
          antsmarching.org - People in every direction

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          X