gitwtfhub

wtf is influxdb-php?

influxdata/influxdb-php — explained in plain English

Analysis updated 2026-07-29 · repo last pushed 2022-11-15

426PHPAudience · developerComplexity · 2/5DormantSetup · moderate

TL;DR

A PHP library that lets applications read and write time-series data to InfluxDB v1.x, with a query builder, timeouts, and admin tools. Now archived in favor of a newer v2 client.

Mindmap

mindmap
  root((repo))
    What it does
      Connects PHP to InfluxDB
      Write and read data
      Query builder included
    Features
      UDP support
      Query timeouts
      Admin and retention policies
    Use cases
      Log page load times
      IoT sensor data collection
      Build dashboards
    Audience
      PHP developers
      Legacy v1 systems
    Status
      Archived for v2 client
      Use v2 for new projects

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Record page load times or error rates from a PHP web app and query them for a dashboard.

REASON 2

Collect IoT sensor readings in a PHP backend and store them for later analysis.

REASON 3

Manage InfluxDB admin tasks like creating users and setting data retention policies from PHP.

What's in the stack?

PHPInfluxDBUDP

How it stacks up

influxdata/influxdb-phpphpacker/phpackergargron/fileupload
Stars426415456
LanguagePHPPHPPHP
Last pushed2022-11-152022-03-03
MaintenanceDormantDormant
Setup difficultymoderateeasymoderate
Complexity2/52/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires a running InfluxDB v1.x instance to connect to, and the library is archived so new projects should use the v2 client instead.

No license information was provided in the explanation.

Wtf does this do

influxdb-php is a library that lets PHP applications talk to InfluxDB, a database designed for time series data. InfluxDB stores information that changes over time, things like server CPU usage, temperature readings, or stock prices. This client gives PHP developers a straightforward way to write data to and read data from that database without needing to handle the underlying connections manually. To use it, a developer creates a client object that connects to their InfluxDB instance. From there, they can select a database, run queries to fetch records, and write new data points. The library includes a query builder that helps construct queries step by step, which is helpful for developers who want to avoid writing raw query strings. It also supports features like UDP for sending data quickly, setting timeouts so database queries don't hang a web request, and managing database admin tasks like creating users and setting retention policies (rules for how long data is kept). This tool is aimed at PHP developers building applications that need to log or analyze time-stamped data. For example, a team running a PHP-based web application might use it to record page load times or error rates, then query that data to build a dashboard. It could also be used for IoT projects, where a PHP backend collects sensor readings and stores them for later analysis. The library handles the communication so developers can focus on their application logic. The most important thing to know is that this library is for InfluxDB version 1.x and is being archived in favor of a newer v2 client. Anyone starting a new project should use the v2 library instead, which handles the more recent version of InfluxDB. This v1 library is maintained for older systems still running on the previous database version.

Yoink these prompts

Prompt 1
Using the influxdb-php v1 client, write a PHP script that connects to InfluxDB, selects a database, and writes a CPU usage data point with a timestamp.
Prompt 2
Show me how to use the influxdb-php query builder to fetch all temperature readings from the last hour from my InfluxDB instance.
Prompt 3
Help me set up the influxdb-php client with a timeout so long-running database queries don't hang my PHP web request.
Prompt 4
Using influxdb-php, create a PHP script that sends sensor data to InfluxDB via UDP for fast writes.

Frequently asked questions

wtf is influxdb-php?

A PHP library that lets applications read and write time-series data to InfluxDB v1.x, with a query builder, timeouts, and admin tools. Now archived in favor of a newer v2 client.

What language is influxdb-php written in?

Mainly PHP. The stack also includes PHP, InfluxDB, UDP.

Is influxdb-php actively maintained?

Dormant — no commits in 2+ years (last push 2022-11-15).

What license does influxdb-php use?

No license information was provided in the explanation.

How hard is influxdb-php to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is influxdb-php for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.