garethhall Posted October 7, 2009 Share Posted October 7, 2009 Hello to all you gurus out there. I have a question. I have a file php file upload system and works all good. Currently I am using the http file upload move_uploaded_file() function. My question is are there any gains by changing it to ftp_put() ??? What are they and what are the benefits of changing if there is any? Quote Link to comment https://forums.phpfreaks.com/topic/176804-solved-php-ftp-and-http-which/ Share on other sites More sharing options...
Garethp Posted October 7, 2009 Share Posted October 7, 2009 Hm... so far as I know the only difference is that FTP is for accessing other websites. There's no point if you're putting it on your own server. But say you want to take a file from server a to server b, and the script is on server a but not server b, you can't upload normally, you need FTP. But if you're going from a client to a server, there's no point Quote Link to comment https://forums.phpfreaks.com/topic/176804-solved-php-ftp-and-http-which/#findComment-932197 Share on other sites More sharing options...
garethhall Posted October 8, 2009 Author Share Posted October 8, 2009 Anyone else have any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/176804-solved-php-ftp-and-http-which/#findComment-932808 Share on other sites More sharing options...
trq Posted October 8, 2009 Share Posted October 8, 2009 ftp is designed to handle file transfers, http is not. If your moving larger files (above 2G I think) http can become unreliable compared to ftp. Quote Link to comment https://forums.phpfreaks.com/topic/176804-solved-php-ftp-and-http-which/#findComment-932811 Share on other sites More sharing options...
garethhall Posted October 8, 2009 Author Share Posted October 8, 2009 Surly when a image is uploaded from a website via a form it still goes up to the server with http? even if you use the ftp php function? Quote Link to comment https://forums.phpfreaks.com/topic/176804-solved-php-ftp-and-http-which/#findComment-932821 Share on other sites More sharing options...
trq Posted October 8, 2009 Share Posted October 8, 2009 Surly when a image is uploaded from a website via a form it still goes up to the server with http? even if you use the ftp php function? No. The ftp extension uses the ftp protocol. Surely that is obvious by the name of the extension. Quote Link to comment https://forums.phpfreaks.com/topic/176804-solved-php-ftp-and-http-which/#findComment-932856 Share on other sites More sharing options...
garethhall Posted October 8, 2009 Author Share Posted October 8, 2009 Yes but the website does not have an ftp connection to the server it has a http connection therefor isn't the file being uploaded to the php temp folder still a http ? Quote Link to comment https://forums.phpfreaks.com/topic/176804-solved-php-ftp-and-http-which/#findComment-932888 Share on other sites More sharing options...
MadTechie Posted October 8, 2009 Share Posted October 8, 2009 Explain what you mean but this as its contradicts itself, Surly when a image is uploaded from a website via a form it still goes up to the server with http? even if you use the ftp php function? Quote Link to comment https://forums.phpfreaks.com/topic/176804-solved-php-ftp-and-http-which/#findComment-932890 Share on other sites More sharing options...
trq Posted October 8, 2009 Share Posted October 8, 2009 Yes but the website does not have an ftp connection to the server it has a http connection therefor isn't the file being uploaded to the php temp folder still a http ? You might want to take a look at what the ftp extension actually does. Your way off base. Quote Link to comment https://forums.phpfreaks.com/topic/176804-solved-php-ftp-and-http-which/#findComment-932937 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.