PHP written class to interact with FTP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

How to interact with FTP

This is just a basic FTP class with PHP that is well written, useful, and expandable.


Step 1: Copy the files to your webserver
Step 2: Setting up the Class
Step 3: Class Variables
Step 4: Simple Message Logging
Step 5: Connecting
Step 6: Calling the Object
Step 6b: Viewing the Output
Step 7: Making our First Directory
Step 8: Uploading a File
Step 9: Viewing the Files
Step 10: Downloading a File
Step 11: Finishing Up


Please add your own credentials in the file «index.php»

// *** Define your host, username, and password
define('FTP_HOST', '');
define('FTP_USER', 'Blimpf');
define('FTP_PASS', 'catfish');

Final thoughts

Well that does it! I hope you now have a better understanding of how to use FTP with PHP. You should now have the necessary skills
to further expand this class to support other common tasks, such as renaming or deleting files and folders ;)