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 today

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

30

—

LowBetter than 62% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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

584d ago

Major Versions

1.0.3 → 2.0.02024-11-26

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29251894?v=4)[Tofex UG](/maintainers/tofex)[@tofex](https://github.com/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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M90](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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