Yii2-Gsftp (Remote Ssh connection to FTP server)

Yii2-Gsftp (Remote Ssh connection to FTP server)

hguenot/yii2-gsftp

Install Demo

This extension needs Yii2-Gftp extension to work and registers a new "FTP" driver using SFTP connection.

Publication time: Friday, July 3, 2015 (4 years ago)

Created by: Семенов Александр Сергеевич

Category: Other

Current version: 1.1
Aug 3, 2015, 10:53:16 AM (4 years ago)

Packagist: hguenot/yii2-gsftp

: https://github.com/hguenot/yii2-gsftp

: 24283 (Per month: 526)

Type of: Компонент


This extension needs Yii2-Gftp extension to work and registers a new "FTP" driver using SFTP connection.

Latest Stable Version Total Downloads License

SFtp

SFtp is a FTP extension for YII 2 Framework based on Yii2-gftp extension.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist hguenot/yii2-gsftp "*"

or add

"hguenot/yii2-gsftp": "*"

to the require section of your composer.json file.

Usage

Here is a basic usage of GFtp extension.

  • Create an FTP application component (in your Web config file)
return [
    // [...]
    'components'=>[
        // [...]
        'ftp' => [
            'class' => '\gftp\FtpComponent',
            'connectionString' => 'sftp://user:pass@host:22',
            'driverOptions' => [ 'timeout' => 120 ]
        ]
    ],
    // [...]
];
  • You can user either a connection string where protocol could be ftp or ftps or directly set protocol, user, pass, host and port properties :
return [
    // [...]
    'components'=>[
        // [...]
        'ftp' => [
            'class' => '\gftp\FtpComponent',
            'driverOptions' => [
                'class' => \gftp\FtpProtocol::valueOf('sftp')->driver,
                'user' => 'me@somewhere.otrb',
                'pass' => 'PassW0rd',
                'host' => 'ssh.somewhere.otrb',
                'port' => 22,
                'timeout' => 120
            ]
        ]
    ],
    // [...]
];

Examples

You can find examples on Yii2-gftp extension site.


All Comments (0)
No Comments

dev-master — Jun 24, 2019, 9:19:33 PM (4 months ago)

V1.1.2 — Apr 3, 2018, 1:27:46 AM (a year ago)

V1.1.1 — Oct 22, 2015, 3:32:12 PM (4 years ago)

1.1 — Aug 3, 2015, 10:53:16 AM (4 years ago)

1.0 — Jun 19, 2015, 10:33:59 PM (4 years ago)

Стандартная установка:

Добавьте composer.json файл вашего проекта:

"hguenot/yii2-gsftp": "*"

Запустите обновление зависимостей


Читать про обнолвение SkeekS CMS