#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    71
    Rep Power
    14

    Question Uploading multiple files using ftp_put?


    Is it possible to uplodad multiple files to the ftp server using ftp_put? If yes how can it be done. Example would be greatly appreciated.
  2. #2
  3. // no comment
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2001
    Posts
    1,645
    Rep Power
    40
    do you mean uploading multiple files in one calling of the ftp_put function? i dont believe that's possible; you have to do a loop to upload multiple files.
  4. #3
  5. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    There is no support for multithreadness in php, so no you cannot upload several files simultaneously.
    And you know I mean that.
  6. #4
  7. No Profile Picture
    Designer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    104
    Rep Power
    13
    I think you can actually buffer the files and upload in pieces no matter wich file it is. Will take some good coding thouhg and multi threadness isn't supported. But u knew that already
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    71
    Rep Power
    14

    Lightbulb


    Thank you for all your replys. Can somebody post an example that will show how I can loop through ftp_put to upload multiple files.

    Ultimately what I want to achieve, is create a web ftp client that will funtion similar to Cute FTP or WS_FTP clients where user can see files in his/her local dirrectory on the left side of the screen, and contents of the ftp site on the right. The listing of files can be achieved by populating dropdown box that allows multiple selections. NOW. How do I select files and send them to the romote ftp site via ftp_put? Any ideas?
  10. #6
  11. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    Newsflash - neither cutie nor ws upload files simultaneously, you jsut queue them and they get uploaded when time comes.

    Instead of select multiple I would use checkbox by each filename and then from your scripts just go thru array with selected files and upload them.
    And you know I mean that.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2001
    Posts
    71
    Rep Power
    14

    Angry


    I just realized that my whole idea is not possible, unless you guys know the other way. How can I get the list of files from the directory located locally on the user's machine? I don't think PHP or Javascript can't do it. Am I wrong?
    Last edited by Sharapov; October 3rd, 2002 at 01:32 PM.
  14. #8
  15. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    >How can I get the list of files from the directory located locally on the user's machine?
    You can't
    And you know I mean that.
  16. #9
  17. // no comment
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2001
    Posts
    1,645
    Rep Power
    40
    >How can I get the list of files from the directory located locally on the user's machine?

    that would be a serious breach of security, the only way for you to get a file from a user's machine is if the user uploads it through a file form.

IMN logo majestic logo threadwatch logo seochat tools logo