PHPackages                             tofex/curl-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. [HTTP &amp; Networking](/categories/http)
4. /
5. tofex/curl-ftp

Abandoned → [fewedev/curl-ftp](/?search=fewedev%2Fcurl-ftp)Library[HTTP &amp; Networking](/categories/http)

tofex/curl-ftp
==============

Tofex Curl FTP

2.0.0(1y ago)11.1k1MITPHPPHP &gt;=7.1.0

Since Apr 21Pushed 1y agoCompare

[ Source](https://github.com/tofex/curl-ftp)[ Packagist](https://packagist.org/packages/tofex/curl-ftp)[ Docs](https://github.com/tofex/curl-ftp)[ RSS](/packages/tofex-curl-ftp/feed)WikiDiscussions main Synced 1mo ago

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

curl-ftp
========

[](#curl-ftp)

Tofex Curl FTP provides a client based on Curl.

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

[](#installation)

```
$ composer require tofex/curl-ftp
```

License
-------

[](#license)

Tofex Curl FTP is licensed under the MIT License - see the LICENSE file for details.

Usage
-----

[](#usage)

### Creating a connection

[](#creating-a-connection)

```
$ftp = new Client();
$ftp->open([
    'host' => 'ftp.example.com',
    'user' => 'username',
    'password' => 'password',
    'port' => 990,
    'ssl' => true,
    'passive' => true,
    'timeout' => 30
]);
```

Alternatively you can create a connection using the `connect()` method

```
$ftp->connect($hostName, $port, $userName, $password, $useSsl, $usePassiveMode, $timeout);
```

### Listing files

[](#listing-files)

```
$files = $ftp->ls();

print_r($files);
```

produces

```
Array
(
    [0] => Array
        (
            [text] => file_1.zip
            [id] => /file_1.zip
        )

    [1] => Array
        (
            [text] => file_2.zip
            [id] => /file_2.zip
        )
)

```

### Setting/changing current directory

[](#settingchanging-current-directory)

```
$ftp->cd('directory/subdirectory');
```

### Read file contents

[](#read-file-contents)

```
$contents = $ftp->read('path/to/file.zip');
```

### Write to file

[](#write-to-file)

```
$contents = 'file contents';
$ftp->write('path/to/file.txt', $contents);
```

### Remove a file/directory

[](#remove-a-filedirectory)

```
$ftp->rm('path/to/file.txt');
```

### Catching errors

[](#catching-errors)

All exceptions are thrown as standard `Exception` classes with the following message format:

```
Could not handle content in path: {path} ({cURL error number})

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~237 days

Total

5

Last Release

531d ago

Major Versions

1.0.3 → 2.0.02024-11-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/6c493bc06b1377d88064311494a32adfe11133e544a91b909bd56dbe266ef67e?d=identicon)[tofex](/maintainers/tofex)

---

Top Contributors

[![aknollmann](https://avatars.githubusercontent.com/u/29251812?v=4)](https://github.com/aknollmann "aknollmann (8 commits)")[![m4tthumphrey](https://avatars.githubusercontent.com/u/582971?v=4)](https://github.com/m4tthumphrey "m4tthumphrey (1 commits)")

---

Tags

curlftpftps

### Embed Badge

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

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M318](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[nyholm/psr7

A fast PHP7 implementation of PSR-7

1.3k235.4M2.4k](/packages/nyholm-psr7)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M292](/packages/pusher-pusher-php-server)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78126.4M414](/packages/react-http)

PHPackages © 2026

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