PHP code example of bashanov / sftp-connector

1. Go to this page and download the library: Download bashanov/sftp-connector library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bashanov / sftp-connector example snippets


/** 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('.'));