Download the PHP package rumd3x/php-ftp without Composer
On this page you can find all versions of the php package rumd3x/php-ftp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-ftp
php-ftp
A Nice and easy to use PHP utility for handling Files over FTP.
Installation
To install via composer just run
Usage
Connecting to Server
The constructor takes any amount of arguments, in any order. It will identify automatically the host, port and ssl specifications, but you still have to specify the username first, then the password.
If you need to, you can specify the port as an integer, the default is 21.
You can specify if the connection uses SSL or not by passing an extra argument with the string 'SSL'.
You can also not specify any args and connect later.
Other FTP Commands
To keep the connection alive
To list everything in the current directory, simply:
Handling directories
You can navigate through folders and create new folders using methods built-in the connection.
To get the list of folders on your current directory:
Or to get the FtpFolder instance of a specific folder by its name:
Creating and Deleting Directories
You can also navigate through folders, create and delete using the FtpFolder Object.
Handling files
To get the list of files on your current directory:
Or to get the FtpFile instance of a specific file by its name:
To read the contents of a file on the server simply
To remove a file from the server simply
Downloading Files
To download a file on the server simply
For large files you can also make async downloads by passing a second parameter
You can also pass a callback to be executed on the download completion.
Editing Files
Creating new Files
All versions of php-ftp with dependencies
ext-mbstring Version *
nesbot/carbon Version ^1.33
rumd3x/php-baseobject Version *