For Developers

Automate your conversions using the RebaseData API

Read DBF with PHP

Run the following command in your project folder to install the RebaseData PHP-Client using Composer:

composer require rebasedata/php-client "1.*"

Then you can read the DBF files using PHP. The following code sample at first defines the input files. Then it converts the input files so that they are readable. This might take a bit of time, since the operation is executed on the secure RebaseData servers. Finally the database table rows are printed. For more examples about how to use the library, check the README.


require 'vendor/autoload.php';

use RebaseData\Converter\Converter;
use RebaseData\InputFile\InputFile;

$inputFiles = [new InputFile('northwind.dbc'), new InputFile('northwind.dct'), new InputFile('northwind.dcx'), new InputFile('categories.dbf'), new InputFile('categories.cdx'), new InputFile('categories.fpt')];

$converter = new Converter();
$database = $converter->convertToDatabase($inputFiles);
$tables = $database->getTables();

foreach ($tables as $table) {
  echo "Reading table '".$table->getName()."'\n";

  $rows = $table->getRowsIterator();
  foreach ($rows as $row) {
    echo implode(', ', $row)."\n";

How does it work?

The RebaseData PHP-Client internally uses our API to convert the DBF files to a standardized format. Then you can read the data using PHP as shown above.

Why use RebaseData?

  • Strong security.
  • Works with Windows, Mac and Linux.
  • Use an API to convert your databases.
  • Professional support.


  • We don't guarantee for the success or correctness of the conversion
  • You are only allowed to convert your own database files
  • By using RebaseData, you agree to our general terms