PHPackages                             juanchosl/ftpclient - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. juanchosl/ftpclient

ActiveLibrary[File &amp; Storage](/categories/file-storage)

juanchosl/ftpclient
===================

Little methods collection in order to create connections with file servers

1.0.0(3mo ago)184MITPHPPHP ^8.1

Since Jan 7Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/JuanchoSL/FtpClient)[ Packagist](https://packagist.org/packages/juanchosl/ftpclient)[ Docs](https://github.com/JuanchoSL/FtpClient)[ RSS](/packages/juanchosl-ftpclient/feed)WikiDiscussions 1.0 Synced 1mo ago

READMEChangelog (1)Dependencies (10)Versions (4)Used By (0)

FtpClient
=========

[](#ftpclient)

Description
-----------

[](#description)

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

How to use
----------

[](#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

[](#instance)

#### Direct instantiation

[](#direct-instantiation)

```
$connection = new Ftp();
```

#### Using a factory

[](#using-a-factory)

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

### Connect

[](#connect)

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

### Authenticate

[](#authenticate)

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

#### Authenticate with public key

[](#authenticate-with-public-key)

For use public and private key over Sftp connection, set the credentials before login

```
$connection->setCredentials($absolute_path_to_publickey,$absolute_path_to_privatekey,$private_key_password);
```

### Operate

[](#operate)

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

#### Generic

[](#generic)

MethodDescriptionconnectConnect to a serverisConnectedCheck if is connectedloginLogin into serverdisconnectDisconnect from serverisLoggedCheck if is loggedisDirCheck if is a dirchmodChange permissionsmodeRetrieve permissionsrenameRename file or dir#### Directories

[](#directories)

MethodDescriptionlistDirContentsFor list the directory contentslistDirsFor list the directory subdirslistFilesFor list the directory filescurrentDirThe current directory pathcreateDirFor create a new directorychangeDirFor change to the selected directoryparentDirFor change to the parent directorydeleteDirFor remove a directory#### Files

[](#files)

MethodDescriptionuploadFor upload a filewriteFor write contents into remote filedownloadFor download a filereadFor read contents from remote filedeleteFor delete a filefilesizeFor retrieve the filesizelastModifiedFor retrieve the file last modification#### For FTP and FTPS

[](#for-ftp-and-ftps)

MethodDescriptionpasivetrue or false for apply pasive modesystemThe server operative system#### For SFTP

[](#for-sftp)

MethodDescriptiongetFingerprintRetrieve and return the server fingerprintgetNegotiationRetrieve and return the negotiation methodssetCredentialsSet public and private key for use on connectionAdapters
--------

[](#adapters)

You can use a wrapper in order to call the library functions using the native names from few OS

ClientLinuxWindowsDescriptionchmodchmodicaclsChange permissionsmodestatcaclsRetrieve permissionsrenamemvmoveRename file or dirlistDirContentslsdirFor list the directory contentslistDirslsDirsdirDirsFor list the directory subdirslistFileslsFilesdirFilesFor list the directory filescurrentDirpwdcdThe current directory pathcreateDirmkdirmkdirFor create a new directorychangeDircdcdFor change to the selected directoryparentDircdUpcdUpFor change to the parent directorydeleteDirrmrmdirFor remove a directoryuploadputputFor upload a filewriteputputFor write contents into remote filedownloadgetgetFor download a filereadgetgetFor read contents from remote filedeletermdelFor delete a filefilesizefilesizefilesizeFor retrieve the filesizelastModifiedlastModifiedlastModifiedFor retrieve the file last modification

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance79

Regular maintenance activity

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

110d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bd6d3dea7eb469817524c42a80683e95793ed4800a6794366503355af046a726?d=identicon)[Juanchosl](/maintainers/Juanchosl)

---

Top Contributors

[![JuanchoSL](https://avatars.githubusercontent.com/u/18701207?v=4)](https://github.com/JuanchoSL "JuanchoSL (91 commits)")

---

Tags

ftpsftpftpsfile-transferfile server

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/juanchosl-ftpclient/health.svg)

```
[![Health](https://phpackages.com/badges/juanchosl-ftpclient/health.svg)](https://phpackages.com/packages/juanchosl-ftpclient)
```

###  Alternatives

[league/flysystem

File storage abstraction for PHP

13.6k639.1M2.1k](/packages/league-flysystem)[nicolab/php-ftp-client

A flexible FTP and SSL-FTP client for PHP. This lib provides helpers easy to use to manage the remote files.

6435.3M24](/packages/nicolab-php-ftp-client)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M61](/packages/creocoder-yii2-flysystem)[yii2mod/yii2-ftp

A flexible FTP and SSL-FTP client for PHP. This lib provides helpers easy to use to manage the remote files.

32433.0k3](/packages/yii2mod-yii2-ftp)[innoge/laravel-rclone

A sleek PHP wrapper around rclone with Laravel-style fluent API syntax

174.1k](/packages/innoge-laravel-rclone)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
