PHPackages                             blacksenator/fritzdbf - 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. blacksenator/fritzdbf

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

blacksenator/fritzdbf
=====================

A simple generator for dbase files using PHP

v1.4(5y ago)1508MITPHPPHP &gt;=7.0

Since Apr 22Pushed 5y ago1 watchersCompare

[ Source](https://github.com/blacksenator/fritzdbf)[ Packagist](https://packagist.org/packages/blacksenator/fritzdbf)[ Docs](https://github.com/blacksenator/fritzdbf)[ RSS](/packages/blacksenator-fritzdbf/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (5)Used By (0)

dBASE file generator for AVM FRITZ!Adr
======================================

[](#dbase-file-generator-for-avm-fritzadr)

The class provides functions to manipulate the address database FRITZ!Adr from AVM. FRITZ!Adr is an address and phonebook for the more or less legacy programs FRITZ!Fon, FRITZ!Data and FRITZ!Com. But still in use for [FRITZ!fax (fax4box)](https://avm.de/service/fritzbox/fritzbox-7590/wissensdatenbank/publication/show/190_FRITZ-fax-fur-FRITZ-Box-installieren-und-einrichten/).

[![alt text](assets/editing_record.jpg "record editing windows")](assets/editing_record.jpg)

Sample image of record editing window in FRITZ!Adr (Copyright© by AVM)

The database is a dBASE III file, the default name is 'FritzAdr.dbf'.

There are three reasons for using this class:

1. because of the difficulty of implementing the outdated extension for dBase (PECL) for current PHP releases and platforms.
2. due to the fact that for the purposes that only just one file with a defined structure has to be written (no reading or manipulating data in records or whatever else is conceivable)
3. lastly, because it allows to write the data to memory instead of a local stored file. So it is possible to create the file via ftp directly in the target directory.

The DB analysis of a few FritzAdr.dbf files has surprisingly shown two variants with 19 e.g. 21 fields. Ultimately the 21er version works for me (default).

Features
--------

[](#features)

- Does create a dBase file in memory instead of writing it directly to a file (unlike the outdated PECL version)
- limited functionality: there is only one changing function: `addRecord()` beside of `getDatabase()` to receive the generated database! If you think more features are needed, fork this repo and feel free to contribute!

Requirements
------------

[](#requirements)

- PHP 7.0
- Composer (follow the installation guide at )

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

[](#installation)

You can install it through Composer:

```
"require": {
    "blacksenator/fritzdbf": "dev-master#1.0"
},
```

or

`git clone https://github.com/blacksenator/fritzdbf.git`

Usage
-----

[](#usage)

setting a new instance with the number of fields:

```
$fritzDbf = new fritzdbf(19);    // number of fields
```

appending a record:

```
$fritzDbf->addRecord(['NAME' => 'John', 'VORNAME' => 'Doe']);
```

receiving the data:

```
$fileData = $fritzDbf->getDatabase());
```

### Samples

[](#samples)

```
use blacksenator\fritzdbf\fritzdbf;

$newData = ['BEZCHNG' => 'Maria Mustermann',   // Feld 1
            'FIRMA'   => 'Bundesdruckerei',
            'NAME'    => 'Mustermann',
            'VORNAME' => 'Erika',
            'TELEFON' => '03025980'
    ];

$fritzDbf = new fritzdbf();         // using default value 21
$fritzDbf->addRecord($newData);
file_put_contents('FritzAdr.dbf', $fritzDbf->getDatabase());
```

or directly via ftp (the reason why I coded this)

```
use blacksenator\fritzdbf\fritzdbf;

$newData = ['BEZCHNG' => 'Max Mustermann',   // Feld 1
            'FIRMA'   => 'Bundesdruckerei',
            'NAME'    => 'Mustermann',
            'VORNAME' => 'Max',
            'TELEFON' => '03025980'
    ];

$ftp_conn = ftp_connect($ftpserver);
ftp_login($ftp_conn, $user, $password);
ftp_chdir($ftp_conn, $destination);
$memstream = fopen('php://memory', 'r+');

$fritzDbf = new fritzdbf();
$fritzDbf->addRecord($newData);

$memstream = $fritzDbf->getDatabase();
rewind($memstream);
ftp_fput($ftp_conn, 'FritzAdr.dbf',  $memstream, FTP_BINARY);
```

License
-------

[](#license)

This script is released under MIT license.

Authors
-------

[](#authors)

Copyright© 2019 - 2021 Volker Püschel

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Total

4

Last Release

1929d ago

PHP version history (2 changes)v1.0PHP &gt;=7.1

v1.2PHP &gt;=7.0

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

avmdbasefax4boxfritzadrfritzboxdbasefaxfritzboxfax4box

### Embed Badge

![Health badge](/badges/blacksenator-fritzdbf/health.svg)

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

PHPackages © 2026

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