Download the PHP package blacksenator/fritzdbf without Composer
On this page you can find all versions of the php package blacksenator/fritzdbf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download blacksenator/fritzdbf
More information about blacksenator/fritzdbf
Files in blacksenator/fritzdbf
Package fritzdbf
Short Description A simple generator for dbase files using PHP
License MIT
Homepage https://github.com/blacksenator/fritzdbf
Informations about the package fritzdbf
dBASE file generator for AVM FRITZ!Adr
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).
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:
- because of the difficulty of implementing the outdated extension for dBase (PECL) for current PHP releases and platforms.
- 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)
- 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
- 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 ofgetDatabase()
to receive the generated database! If you think more features are needed, fork this repo and feel free to contribute!
Requirements
- PHP 7.0
- Composer (follow the installation guide at https://getcomposer.org/download/)
Installation
You can install it through Composer:
or
Usage
setting a new instance with the number of fields:
appending a record:
receiving the data:
Samples
or directly via ftp (the reason why I coded this)
License
This script is released under MIT license.
Authors
Copyright© 2019 - 2021 Volker Püschel