PHPackages                             lc5/ftp - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. lc5/ftp

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

lc5/ftp
=======

A simple object wrapper around native ftp\_\* functions.

1.1.1(10y ago)246MITPHPPHP &gt;=5.4.0CI failing

Since Nov 25Pushed 10y ago1 watchersCompare

[ Source](https://github.com/Lc5/Ftp)[ Packagist](https://packagist.org/packages/lc5/ftp)[ Docs](https://github.com/Lc5/Ftp)[ RSS](/packages/lc5-ftp/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

Ftp [![Build Status](https://camo.githubusercontent.com/2af60159d5bc49aacd418719330ed5eacb9fbc560338f729e6658fe0a1858214/68747470733a2f2f7472617669732d63692e6f72672f4c63352f4674702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Lc5/Ftp)
========================================================================================================================================================================================================================================================

[](#ftp-)

A simple object wrapper around native ftp\_\* functions. Fully unit-tested.

Installation
------------

[](#installation)

Use [Composer](https://getcomposer.org/) to install the package:

```
$ composer require lc5/ftp

```

Usage
-----

[](#usage)

```
use Lc5\Ftp\Ftp;

try {
    $ftp = new Ftp('ftp.example.com', 'username', 'password');

    //Save remote.txt to local.txt
    $ftp->get('local.txt', 'remote.txt', FTP_ASCII);

    //Actually you don't have to explicitly call close()
    //It will get called automatically as a part of the __destruct() method
    $ftp->close();

    //For anonymous login you only need to pass the host address
    $ftp = new Ftp('ftp.example.com');
    $ftp->pasv(true);

    //Get list of files in current directory and print them
    $files = $ftp->rawlist('.');

    foreach ($files as $file) {
        echo $file . PHP_EOL;
    }
} catch (\Exception $e) {
    echo $e->getMessage();
}
```

Extending
---------

[](#extending)

```
use Lc5\Ftp\Ftp;

class MyFtp extends Ftp
{
    public function myFunction()
    {
        $connection = $this->connect();

        //your custom code...
    }
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~201 days

Total

3

Last Release

3787d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e968739c39a6ff1eb266d168916f388ba3523eb247cd5820afd42919cc2385f?d=identicon)[Lc5](/maintainers/Lc5)

---

Top Contributors

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

---

Tags

ftp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lc5-ftp/health.svg)

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

###  Alternatives

[ijanki/ftp-bundle

A Symfony2 Bundle to wrap the PHP ftp extension functionality in a more classy way.

22674.4k](/packages/ijanki-ftp-bundle)[fotografde/cakephp-ftp

FTP/SFTP Plugin for CakePHP

6062.3k](/packages/fotografde-cakephp-ftp)[randsonjs/inflect

A PHP class to handle words in Portuguese

1710.7k](/packages/randsonjs-inflect)

PHPackages © 2026

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