Skip to content

PHP FTP and SFTP Client Connector Library simplifies FTP and SFTP protocol operations, making it easy to manage remote files and establish distant server connections. Whether you need basic file transfers or more advanced functionality, this library has you covered.

License

Notifications You must be signed in to change notification settings

ajenguianis/ftp-sftp-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP FTP and SFTP Client Connector Library

License Latest Release Total Downloads Latest Unstable Version PHP Version

Welcome to the PHP FTP and SFTP Client Connector Library! This library simplifies FTP and SFTP protocol operations, making it easy to manage remote files and establish distant server connections. Whether you need basic file transfers or more advanced functionality, this library has you covered.

Key Features

  • User-Friendly Assistance: This library offers easy-to-use helper functions for handling remote files and establishing distant server connections.

  • Emphasis on Simplicity and Efficiency: We've designed this package to be lightweight. It acts as a convenient layer on top of PHP's native FTP and SFTP protocol capabilities, enriched with helpful utilities.

  • Customization Options: Advanced users can personalize functionality by inheriting from one of the two classes SftpClientConnector and FtpClientConnector included in the package.

Getting Started

To get started with our library, you can install it via Composer:

     composer require ajenguianis/ftp-sftp-connector

Usage

Connexion

Connect to ftp or SFTP server:

$connector= new \AA\ServerConector\Connector();
//set protocol ftp or sftp
$connector->setProtocol('ftp');
$connector->setUp($host, $login, $password, $port);
$connector->connect();

Download file

/**
 * @param $localFile
 * @param $remoteFile
 * @param $mode
 * @return bool|string
 */
 $connector->downloadFile($localFile,$remoteFil, $mode);

Get files list

 $connector->nlist($directory,$recursive);

Get files by extension

 $connector->getByExtension($directory,$recursive,$extension);

Archive file

 $connector->archive($fileFrom, $fileTo);    

About

PHP FTP and SFTP Client Connector Library simplifies FTP and SFTP protocol operations, making it easy to manage remote files and establish distant server connections. Whether you need basic file transfers or more advanced functionality, this library has you covered.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages