popphp / pop-ftp
Pop FTP Component for Pop PHP Framework
4.0.2
2025-10-30 16:11 UTC
Requires
- php: >=8.3.0
- ext-ftp: *
This package is auto-updated.
Last update: 2026-03-01 00:09:36 UTC
README
Overview
pop-ftp is a simple and convenient FTP adapter for processing FTP requests via PHP.
It is a component of the Pop PHP Framework.
Install
Install pop-ftp using Composer.
composer require popphp/pop-ftp
Or, require it in your composer.json file
"require": {
"popphp/pop-ftp" : "^4.0.2"
}
Quickstart
Create a new directory, change into it and upload a file
use Pop\Ftp\Ftp; $ftp = new Ftp('ftp.myserver.com', 'username', 'password'); $ftp->mkdir('somedir'); $ftp->chdir('somedir'); $ftp->put('file_on_server.txt', 'my_local_file.txt');
Download file from a directory
use Pop\Ftp\Ftp; $ftp = new Ftp('ftp.myserver.com', 'username', 'password'); $ftp->chdir('somedir'); $ftp->get('my_local_file.txt', 'file_on_server.txt');