PHPackages                             jalsoedesign/filezilla - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. jalsoedesign/filezilla

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

jalsoedesign/filezilla
======================

A powerful PHP library for parsing and working with FileZilla `sitemanager.xml` files. It allows you to extract server details, manage configurations, and integrate FileZilla data into your PHP applications.

2.0.5(11mo ago)023[1 PRs](https://github.com/h2ooooooo/FileZilla/pulls)MITPHPPHP &gt;=8.0CI failing

Since May 20Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/h2ooooooo/FileZilla)[ Packagist](https://packagist.org/packages/jalsoedesign/filezilla)[ Docs](https://www.jalsoedesign.net)[ RSS](/packages/jalsoedesign-filezilla/feed)WikiDiscussions master Synced 2mo ago

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

FileZilla Configuration Parser
==============================

[](#filezilla-configuration-parser)

[![Latest Stable Version](https://camo.githubusercontent.com/4c83af830373ceabb1a729924cb55f58eef1e6b28be1ec970d1a2e448c481082/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a616c736f6564657369676e2f66696c657a696c6c612e737667)](https://packagist.org/packages/jalsoedesign/filezilla)[![License](https://camo.githubusercontent.com/b4df84f7039d19e37b61fa560014c976d243e6038238816dba3a6d3340c82ca5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6a616c736f6564657369676e2f66696c657a696c6c612e737667)](https://github.com/h2ooooooo/FileZilla/blob/main/LICENSE)

A powerful PHP library for parsing and working with FileZilla `sitemanager.xml` files. It allows you to extract server details, manage configurations, and integrate FileZilla data into your PHP applications.

---

Features
--------

[](#features)

- 🎉 **Parse FileZilla `sitemanager.xml` files**: Extract and work with server folders as well as individual server details.
- 🔒 **Stop using credentials in your code**: If FileZilla already provides this unencrypted, and you're already using it, why not just read it from there?
- ✨ **Supports all FileZilla server attributes**: Including host, port, protocol, and more.
- 🔧 **Flexible API**: Query specific server details or all servers in a folder.
- 📜 **Enum-Based Design**: Strongly typed enums for protocols, logon types, and more.
- ⚙️ **Works out of the box**: The library defaults to the `sitemanager.xml` of your system. No need to specify a path.
- 🚀 **PHP 8.0+ Compatible**: Built with modern PHP practices and strict typing.

---

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

[](#installation)

Install the package via Composer:

```
composer require jalsoedesign/filezilla
```

---

Usage
-----

[](#usage)

### Basic usage

[](#basic-usage)

Load the default sitemanager.xml from your system (using `fromSystem()`) and iterate through all servers and print their name.

```
use jalsoedesign\filezilla\SiteManager;

$siteManager = SiteManager::fromSystem();

$servers = $siteManager->getServers();

foreach ($servers as $server) {
    echo 'Full server path: ' . $server->getPath() . PHP_EOL;
}
```

### Many other examples

[](#many-other-examples)

See the [**examples folder**](./examples).

### Structure of sitemanager.xml

[](#structure-of-sitemanagerxml)

The test fixture [`tests/fixtures/sitemanager.xml`](tests/fixtures/sitemanager.xml) provides an example of all possible options.

Folder structure of sitemanager.xml```
📁 My Sites
│   📁 Protocols
│   ├── ☁️ azure-blob-storage.example.com
│   ├── ☁️ azure-file-storage.example.com
│   ├── ☁️ backblaze-b2.example.com
│   ├── ☁️ box.example.com
│   ├── ☁️ dropbox.example.com
│   ├── 🌐 ftp.example.com - explicit ftp over tls
│   ├── 🌐 ftp.example.com - explicit ftp over tls if available
│   ├── 🌐 ftp.example.com - implicit ftp over tls
│   ├── 🌐 ftp.example.com - plain ftp
│   ├── 🌐 google-cloudstorage.example.com
│   ├── ☁️ google-drive.example.com
│   ├── ☁️ onedrive.example.com
│   ├── ☁️ openstack-swift.example.com
│   ├── ☁️ rackspace-cloud-storage.example.com
│   ├── ☁️ s3.example.com
│   ├── 🌐 sftp.example.com
│   ├── 🌐 webdav.example.com - http
│   ├── 🌐 webdav.example.com - https
│   📁 Settings
│   │   📁 Advanced
│   │   ├── 🌐 _default
│   │   │   📁 Adjusted server time
│   │   │   ├── 🌐 minus 1 hour
│   │   │   ├── 🌐 plus 1 hour
│   │   │   ├── 🌐 plus 30 minutes
│   │   │   📁 Bypass proxy
│   │   │   ├── 🌐 disabled
│   │   │   ├── 🌐 enabled
│   │   │   📁 Directory comparison
│   │   │   ├── 🌐 disabled
│   │   │   ├── 🌐 enabled
│   │   │   📁 Local directory
│   │   │   ├── 🌐 local directory - Unix
│   │   │   ├── 🌐 local directory - Windows
│   │   │   📁 Remote directory
│   │   │   ├── 🌐 remote directory - Unix
│   │   │   ├── 🌐 remote directory - Windows
│   │   │   📁 Server type
│   │   │   ├── 🌐 cygwin
│   │   │   ├── 🌐 default
│   │   │   ├── 🌐 dos with back slashes
│   │   │   ├── 🌐 dos with forward slashes
│   │   │   ├── 🌐 doslike
│   │   │   ├── 🌐 hp nonstop
│   │   │   ├── 🌐 mvs
│   │   │   ├── 🌐 unix
│   │   │   ├── 🌐 vms
│   │   │   ├── 🌐 vxworks
│   │   │   ├── 🌐 zvm
│   │   │   📁 Synchronized browsing
│   │   │   ├── 🌐 disabled
│   │   │   ├── 🌐 enabled
│   │   📁 Charset
│   │   ├── 🌐 autodetect
│   │   ├── 🌐 custom charset - utf16
│   │   ├── 🌐 force utf8
│   │   📁 General
│   │   │   📁 Background color
│   │   │   ├── 🌐 none
│   │   │   ├── 🌐 red
│   │   │   📁 Comments
│   │   │   ├── 🌐 no comments
│   │   │   ├── 🌐 with comments
│   │   │   📁 Custom port
│   │   │   ├── 🌐 custom port 8080
│   │   │   ├── 🌐 default port
│   │   📁 Transfer Settings
│   │   ├── 🌐 transfer mode - 6 limit
│   │   ├── 🌐 transfer mode - Active
│   │   ├── 🌐 transfer mode - Default
│   │   ├── 🌐 transfer mode - No limit
│   │   ├── 🌐 transfer mode - Passive
│   📁 Various
│   ├── 🌐 Special !"#¤%&()=
│   ├── 🌐 Utf8 💞💢💫

```

---

Documentation
-------------

[](#documentation)

### API Reference

[](#api-reference)

#### Server

[](#server)

The `Server` class represents a single server configuration from the FileZilla `sitemanager.xml` file. It provides access to all attributes of a server, including its host, protocol, directories, and more.

MethodReturnsDescription`getHost()`stringGet the server's hostname or IP address.`getPort()`intGet the server's port number.`getProtocol()`intGet the server's protocol ([`ServerProtocol enum`](#Enums)).`getLogonType()`intGet the server's logon type ([`LogonType enum`](#Enums)).`getUser()`?stringGet the username for authentication (nullable).`getPassword()`?stringGet the password for authentication (nullable).`getKeyFile()`?stringGet the path to the server's private key file (nullable).`getTimezoneOffset()`?intGet the server's timezone offset (nullable).`getPassiveMode()`?stringGet the server's passive mode ([`PassiveMode enum`](#Enums), nullable).`getMaximumMultipleConnections()`?intGet the maximum concurrent connections (nullable).`getEncodingType()`?stringGet the encoding type ([`CharsetEncoding enum`](#Enums), nullable).`getCustomEncoding()`?stringGet the custom encoding if the encoding type is custom.`getBypassProxy()`?boolCheck whether the server bypasses the proxy (nullable).`getType()`intGet the server's type ([`ServerType enum`](#Enums)).`getName()`stringGet the name of the server as it appears in FileZilla.`getComments()`?stringGet the server's comments (nullable).`getLocalDirectory()`?stringGet the initial local directory for the server (nullable).`getRemoteDirectory(string $default = null, bool $useRootPrefix = true)`?stringParse and return the server's remote directory (nullable).`getSynchronizedBrowsing()`?boolCheck whether synchronized browsing is enabled (nullable).`getDirectoryComparison()`?boolCheck whether directory comparison is enabled (nullable).`getColour()`intGet the background color.`getColor()`?stringAlias for `getColour()` (nullable).#### Folder

[](#folder)

The `Folder` class represents a collection of `Server` and/or `Folder` objects, allowing for recursive structures of servers and folders.

MethodReturnsDescription`getName()`stringGet the name of the folder.`getChildren(bool $recursive, ?string $filter)`Server\[\]/Folder\[\]Get all children in the folder, optionally recursive and filtered by type.`countServers(bool $recursive)`intCount the number of servers in the folder, optionally including subfolders.`countFolders(bool $recursive)`intCount the number of folders in the folder, optionally including subfolders.`getServers(bool $recursive)`Server\[\]Get all servers in the folder, optionally including subfolders.`getFolders(bool $recursive)`Folder\[\]Get all folders in the folder, optionally including subfolders.`getServer(string $serverPath)`ServerGet a specific server by its path.`getFolder(string $folderPath)`FolderGet a specific folder by its path.`getChildPath(string $childName, ?string $childPath)`stringConstruct a full path for a child within the folder.#### SiteManager

[](#sitemanager)

The `SiteManager` class extends `Folder`, inheriting all of its functionality, and represents the root structure of FileZilla's server and folder configuration as defined in the `sitemanager.xml` file. In addition to managing nested folders and servers, it provides access to metadata about the configuration file itself.

MethodReturnsDescription`SiteManager::fromSystem()`SiteManagerCreate a `SiteManager` instance from the system's default configuration.`getVersion()`stringGet the version of the `sitemanager.xml` file.`getPlatform()`stringGet the platform specified in the `sitemanager.xml` file.### Enums

[](#enums)

Enum ClassDescription`CharsetEncoding`Charset encodings (Auto, UTF-8 or Custom)`Colour`Background colours (e.g. Red, Green, Blue).`LogonType`User authentication types (e.g., Normal, Anonymous).`PassiveType`The PasvMode setting (MODE\_DEFAULT, MODE\_ACTIVE or MODE\_PASSIVE)`ServerProtocol`Server protocols like FTP, SFTP, FTPS, etc.`ServerType`Server types like Unix, DOS, etc.All enum classes have `Enum::toCamelCase($value)` as well as `Enum::getConstantName($value)` methods.

Filezilla config parsing
------------------------

[](#filezilla-config-parsing)

FileZilla FieldAttributeCastingNoteHosthoststringRequiredPortportintProtocolprotocolintTypetypeintUseruserstringRequiredPasspasswordstringRequired. Base64 encoded if `encoding="base64"`KeyfilekeyFilestringRequiredColourcolourintLogontypelogonTypeintTimezoneOffsettimezoneOffsetintPasvModepassiveModestringRequiredMaximumMultipleConnectionsmaximumMultipleConnectionsintEncodingTypeencodingTypestringRequiredBypassProxybypassProxyboolNamenamestringRequiredCommentscommentsstringRequiredLocalDirlocalDirectorystringRequiredRemoteDirremoteDirectorystringRequiredSyncBrowsingsynchronizedBrowsingboolDirectoryComparisondirectoryComparisonboolCustomEncodingcustomEncodingstringRequired---

Contributing
------------

[](#contributing)

Contributions are welcome! Please submit a pull request or open an issue if you find a bug or have an idea for an enhancement.

---

License
-------

[](#license)

This library is open-sourced under the [MIT license](https://github.com/jalsoedesign/filezilla/blob/main/LICENSE).

---

Credits
-------

[](#credits)

- **Author**: [JalsoeDesign](https://www.jalsoedesign.net)

---

Support
-------

[](#support)

If you find this library useful, feel free to ⭐ the repository or share your feedback!

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance50

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity71

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

Recently: every ~549 days

Total

9

Last Release

354d ago

Major Versions

v1.0.4 → 2.0.02024-12-02

PHP version history (2 changes)v1.0.0PHP &gt;=5.4

2.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b21c12f271f981851aa9e0190050713165d2eef8c4fad0c919628e2834a3c06?d=identicon)[jalsoedesign](/maintainers/jalsoedesign)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jalsoedesign-filezilla/health.svg)

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

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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