Go to file
Simon Vieille c5e785c3a8 merge failed... 2015-06-01 11:07:13 +02:00
src merge failed... 2015-06-01 11:07:13 +02:00
README.md Update README.md 2014-07-21 14:42:01 +02:00
changelog.rst added changelog 2014-08-16 00:43:23 +02:00
composer.json Update composer.json 2014-07-18 17:07:27 +02:00

README.md

idct-sftp-client

Library that provides wrapper methods around SSH2, SCP and SFTP to simplify file download/upload over SSH/SCP/SFTP.

warning

I am still thinking about unification of download / upload methods by passing a paramter which would define the connection type therefore method names may change.

example

use IDCT\Networking\Ssh\SftpClient;
use IDCT\Networking\Ssh\Credentials;

$client = new SftpClient();

$username = 'YOUR_USER_NAME';
$password = 'YOUR_PASSWORD';
$host = 'HOST_NAME';

$credentials = Credentials::withPassword($username, $password);

$client->setCredentials($credentials);
$client->connect($host);

$client->download(ENTER_REMOTE_FILE_NAME);
$client->download(ENTER_REMOTE_FILE_NAME, ENTER_LOCAL_FILE_NAME);

$client->scpDownload(ENTER_REMOTE_FILE_NAME);

$client->scpUpload(ENTER_LOCAL_FILE_NAME,ENTER_REMOTE_FILE_NAME);

$client->close();