juanchosl/ftpclient

Little methods collection in order to create connections with file servers

dev-master 2024-06-28 13:47 UTC

This package is auto-updated.

Last update: 2024-10-12 22:28:34 UTC


README

Description

Little methods collection in order to create connections to remote file servers

How to use

You needs to know the remote file server type connection in order to select the rigth instance

  • Ftp
  • Ftps over SSL
  • Sftp over SSH

Instance

Direct instantiation

$connection = new Ftp();

Using a factory

$connection = EngineFactory::getInstance(EnginesEnum::FTP);

Connect

$connection->connect("ftp.servername.com", 21);

Authenticate

$connection->login("username", "password");

Operate

You have a few generic methods and can operate over directories and files

Generic

Directories

Files

For FTP and FTPS

For SFTP