Warning! This page documents an old version of InfluxDB, which is no longer actively developed. InfluxDB v1.2 is the most recent stable version of InfluxDB.

There’s a PHP InfluxDB library on GitHub thanks to C├ęsar D. Rodas.

Installation (using composer)

composer require crodas/influx-php:\*



$client = new \crodas\InfluxPHP\Client(
    "localhost", // host
    8086,        // port
    "root",      // user
    "root"       // password

Creating a Database


$db = $client->createDatabase("foobar");
$db->createUser("user", "pass");

Inserting Data


$db = $client->foobar;
$db->insert("some label", ['foobar' => 'bar']);



$db = $client->foobar;

foreach ($db->query("SELECT * FROM foo;") as $row) {
    var_dump($row, $row->time);

Be a fantastic human and contribute to these docs.