Download the PHP package tomedio/php-ftp-client without Composer
On this page you can find all versions of the php package tomedio/php-ftp-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-ftp-client
tomedio/php-ftp-client
A modern FTP and SSL-FTP client for PHP, offering easy-to-use helpers for managing remote files.
Note: This library requires PHP >=8.1.
Installation
To get started with PHP FTP Client in your project, you can install it via Composer:
After installation, you can use the library in your PHP project to connect to an FTP server and perform various operations.
Getting Started
Connect to an FTP server:
OR
Connect to an FTP server via SSL (on port 990 or another port):
Note: The connection is implicitly closed at the end of script execution (when the object is destroyed). Therefore, it is unnecessary to call $ftp->close()
, except for an explicit re-connection.
Usage
Upload all files and directories:
Note: FTP_ASCII and FTP_BINARY are predefined PHP internal constants.
Get a directory size:
Count the items in a directory:
Detailed list of all files and directories in a directory:
Results:
Upload a file to the FTP server:
Download a file from the FTP server:
Delete a file from the FTP server:
Delete a directory from the FTP server:
Create a directory on the FTP server:
Rename a file or directory on the FTP server:
Change the permissions of a file or directory on the FTP server:
Change the owner of a file or directory on the FTP server:
Change the group of a file or directory on the FTP server:
Get the last modified time of a file or directory on the FTP server:
Get the size of a file on the FTP server:
Get the system type of the FTP server:
Get the current working directory on the FTP server:
Change the current working directory on the FTP server:
List the contents of the current directory on the FTP server:
List the contents of a directory on the FTP server:
Error Handling
The library throws exceptions when an error occurs. You can catch exceptions to handle errors in your application:
License
PHP FTP Client is open-source software licensed under the MIT license.
All versions of php-ftp-client with dependencies
ext-ftp Version *