...

View Full Version : PHP's FTP functions vs. HTTP POST upload



Jero
11-02-2006, 01:53 PM
I'm wondering what would be the best solution for uploading large (>100MB) files. Using the FTP functions (http://php.net/ftp) or the HTTP POST method (http://php.net/manual/en/features.file-upload.php)?

Thanks in advance!

_Aerospace_Eng_
11-02-2006, 02:07 PM
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.

marek_mar
11-02-2006, 02:29 PM
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.

Jero
11-02-2006, 06:05 PM
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?

marek_mar
11-02-2006, 08:20 PM
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.

goughy000
11-02-2006, 10:31 PM
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

Jero
11-03-2006, 09:22 AM
Thanks for your replies, guys.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum