using ftp_[functions] and generating local file list

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

using ftp_[functions] and generating local file list

Post by Burrito »

I had an epiphany late last night about this project on which I am working. We currently have a "file manager" that resides on the web machine where our users can upload files from their local machines to the web server then use them in their course material (for a LMS). It works fine, but can be quite cumbersome when they need to upload a lot of files (only one at a time kinda thing).

I played a lil' yesterday with the ftp functions and found it quite useful for uploading files to an ftp server. The beauty of it is, I was able to just loop over a file list and have them ALL uploaded in one feld swoop.

so my idea, and forgive if this has already been done and I am just reiterating someone elses gaba, was to create a web interface that when they hit the file manager site, would list their files (locally) in a multiple select box that they could just select the files they want, submit and wholla, they're all uploaded and ready to use.

Of course this stroke of brilliance was met with reality in the morning when I woke up and was driving to work... I realized that php prolly can not list out the files on the user's local machine (it's all server side), but alas I came here seeking help. Can this be done using php? If not can it be done using JS? Has somethign like this already been done and am I just reinventing the wheel?...I don't mind wheel reinvention as I think it helps me learn, but if it has been done, I'd like to at least review the code so I have something with which to work.

Your detailed, considered response will be most greatly apprecieated.

thx in advance,

Burr
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

burrito wrote:Can this be done using php?
no
burrito wrote:If not can it be done using JS?
no
burrito wrote:Has somethign like this already been done and am I just reinventing the wheel?
quite likely.

I believe ActiveX and Java can be of help in this manner... however, what about a "special" flag that tells the server to unpack the zip they send? :) Sure, it's an extra step, but saves from having to use ActiveX or Java.. :P
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

/me has wasted all morning searching for an activeX control that does this (a free one).

can anyone inform me of a place I might find one? If I can't find one, then when I get home tonight I will start making one and share with the world...assuming I can blunder my way through it.
Post Reply