Page 1 of 1

PHP Downloader

Posted: Thu Sep 17, 2009 7:11 pm
by baudday
I wrote a little script for downloading files off your server using php. Basically you put the script in a directory, it loops through, displays all the files in that directory, and lets you select which files you want to download. It has a select all option. It then builds an archive of the selected files and forces the download. I was looking for something like this, but couldn't find it although I'm sure they're out there. Anyway, I'd just like some critique on it. I made a project on sourceforge where you can download the code. Installation should take all of 2 minutes. I realize this is not a solution for someone who will be receiving a lot of traffic to their server and such, but I specifically built this for personal use. For me, I use it because I backed all my music up to my home server. This script allows me to download my music easily without ftp.

I will be adding security such as a login system to the script. Also, right now it can only loop through the directory it's installed in. I'd like to be able to allow the admin to set a directory which they want users to download from, and then have it loop through and display ALL files in that directory. For instance, if the file structure is something like Music->Artists->Albums->Songs, I'd like for it to display music with artists indented, albums indented slightly more, and songs indented further from that. I also have plans to add a little style to the UI, but that's not really a priority at this point. I'm still working on functionality.

So I'd just like to know what people think of the script so far. For one, I think building an archive would take an increasingly long amount of time as more files were selected. I was wondering if there was maybe a more efficient way of accomplishing what I'm trying. Any input at all is appreciated, just don't tell me it sucks and not say why.

You can download the source code here <http://sourceforge.net/projects/mahyomusic/> or from the attachment.