Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Aug 2004
    Location
    The Netherlands
    Posts
    211
    Thanks
    0
    Thanked 1 Time in 1 Post

    PHP's FTP functions vs. HTTP POST upload

    I'm wondering what would be the best solution for uploading large (>100MB) files. Using the FTP functions or the HTTP POST method?

    Thanks in advance!

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    I think most hosts have a 2mb upload limit using the php post method. If you aren't using a secure ftp connection then using php's ftp functions might work better.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Mind you that HTTP upload is done by the user and upload with the FTP functions is done by PHP which is, in most cases the server.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #4
    Regular Coder
    Join Date
    Aug 2004
    Location
    The Netherlands
    Posts
    211
    Thanks
    0
    Thanked 1 Time in 1 Post
    Quote Originally Posted by marek_mar View Post
    Mind you that HTTP upload is done by the user and upload with the FTP functions is done by PHP which is, in most cases the server.
    Do you mean that the FTP functions are only for FTP traffic between 2 servers and not from a user's computer to a server?

  • #5
    Senior Coder
    Join Date
    Aug 2003
    Location
    One step ahead of you.
    Posts
    2,815
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Well they are from FTP client to FTP server (it's actually always client to server, clinet being the one that connects)... but if you use the PHP FTP functions then PHP will be the client.

    FTP is of course better for your needs but you should connect to your FTP server rather than to PHP via HTTP.
    PHP could connect to the the user via FTP but it won't work for everybody.
    I'm not sure if this was any help, but I hope it didn't make you stupider.

    Experience is something you get just after you really need it.
    PHP Installation Guide Feedback welcome.

  • #6
    Regular Coder goughy000's Avatar
    Join Date
    Nov 2005
    Location
    England
    Posts
    415
    Thanks
    0
    Thanked 0 Times in 0 Posts
    remember! PHP is server side

    so it cant directly connect the CLIENT to the ftp server

    for a user to send a file to an ftp using php

    it would be HTTP POST -> PHP -> FTP


    if its a large file via HTTP Post try and get a status bar involved.. ensuring the user something is happening

    there are scripts already made that do this.. so why reinvent the wheel!

    if you want it to be your own script then why not look at them for ideas anyway


    there is also web folders if you want to give the user this amount of access
    PHP Freelancing!
    ByteForums!
    Scriptlance.comNeed a job done quick? post it on scriptlance! OR! your a programmer? sign up and get paid for these jobs!

  • #7
    Regular Coder
    Join Date
    Aug 2004
    Location
    The Netherlands
    Posts
    211
    Thanks
    0
    Thanked 1 Time in 1 Post
    Thanks for your replies, guys.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •