bashanov / sftp-connector
Package to establish secure FTP (SFTP) connection via curl or ssh2.
0.1
2019-06-17 12:59 UTC
Requires
- php: >=7.1
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2026-03-18 04:47:09 UTC
README
Library helps to establish SFTP connection and work with files and folders via curl or ssh2.
Install
Use composer to install
composer require bashanov/sftp-connector
Use
There are 2 ways to create sftp connection.
- Create Factory instance with connection configuration. Example:
/** Creating new connection and getting information about files and folders in current directory */ $sftp = SftpConnectorFactory::createConnection([ 'host' => 'test.website.com', 'username' => 'login', 'password' => 'password' ]); print_r($sftp->ls('.'));
- Create
adapterextendsAbstractAdapterclass and overridegetConfigmethod. You may find the example file in repository,src/adapter/TestAdapter.
Notes
Supports only auth_none and auth_password methods.