tiagobutzke/php-remote-server

Library to connect and manage remote servers via PHP

0.1.1 2014-09-14 03:36 UTC

This package is not auto-updated.

Last update: 2024-12-17 05:07:23 UTC


README

Library to connect and manage remote servers via PHP.

--

PHP extensions

  • SSH2 ** Ubuntu Instalation:
// apt-get install libssh2-php
// /etc/inid.d/apache2 restart

--

Install via Composer

# add in composer.json
"require-dev": {
    "tiagobutzke/php-remote-server": "1.0.*"
}

How to use

SSH protocol

$remoteServer = new \RemoteServer\RemoteServer(
    new \RemoteServer\Ssh()
);

$remoteServer->connect('127.0.0.1', 'username', 'password', 'port');
$remoteServer->execute('ls -la');
var_dump($remoteServer->getResult());
var_dump($remoteServer->getArray());

Telnet protocol

$remoteServer = new \RemoteServer\RemoteServer(
    new \RemoteServer\Telnet()
);

$remoteServer->connect('127.0.0.1', 'username', 'password', 'port');
$remoteServer->execute('ls -la');
var_dump($remoteServer->getResult());
var_dump($remoteServer->getArray());

--

Doubts

Email: tiago.butzke@gmail.com

Twitter: @tiagobutzke