FTP is incredibly useful and indispensable for some tasks, but it also has certain security limitations. One is that FTP passes passwords in clear text.
For example, the major example in this chapter provides functionality for accessing FTP via the web; this functionality is often used to provide users with easy access to their own files on their remote accounts. If the web server has access to the user accounts, it is much more secure to have the web server FTP to itself, so that no passwords go out over the Internet. If the user accounts are not accessible to the web server's host, but are accessible on a host local to the web server's host, judicious use of firewalls and virtual private networks can help to secure the FTP server and the user's passwords.
This chapter covers:
Adding FTP support to PHP
Basic use of PHP's FTP extension
Practical examples:
Building an FTP convenience wrapper
Building a web-based FTP client
Using the different functions
An alphabetical function reference