Copy Files from the Server using FTP in php - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Copy Files from the Server using FTP in php (/showthread.php?tid=11632) |
Copy Files from the Server using FTP in php - El Forum - 09-17-2008 [eluser]magz[/eluser] Hi all. Need Help, I would like to copy/download files from the server to local using FTP. But,I dont know how to do it.. Can anyone give some advise or help? Copy Files from the Server using FTP in php - El Forum - 09-17-2008 [eluser]xwero[/eluser] ftp_get Copy Files from the Server using FTP in php - El Forum - 09-17-2008 [eluser]magz[/eluser] @xwero, tnx for the hint.. :-) it somehow lead me to the way.. I've got what I want. Can you check my codes?Is there anyway to make it more optimized?, not that so important, anyway, it already working. just want to know if there are better way.. check code below: Code: <?php tnx Copy Files from the Server using FTP in php - El Forum - 09-17-2008 [eluser]xwero[/eluser] i hope it's not a real username an password. I see you store it in the local directory images so i assume they are images, then i would use the FTP_BINARY flag. Copy Files from the Server using FTP in php - El Forum - 09-17-2008 [eluser]magz[/eluser] waaaahhhh....sorry, i forgot to change it... but i trusted u... and all the codeigniter community... Copy Files from the Server using FTP in php - El Forum - 09-17-2008 [eluser]magz[/eluser] Anyway, What i dont understand is the FTP_BINARY and FTP_ASCII, what are the differnce between them? Copy Files from the Server using FTP in php - El Forum - 09-17-2008 [eluser]xwero[/eluser] ASCII content is human readable, BINARY content is not human readable. That would be the non developer description. So text files are best send in ASCII and images, pdfs but even .doc files should be send BINARY. Copy Files from the Server using FTP in php - El Forum - 09-17-2008 [eluser]magz[/eluser] @xwero, tnx alot.. |