PHPackages                             ss89/errormator-client - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. ss89/errormator-client

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ss89/errormator-client
======================

errormator.com client library

24PHP

Since Aug 10Pushed 12y ago1 watchersCompare

[ Source](https://github.com/ss89/php-errormator-client)[ Packagist](https://packagist.org/packages/ss89/errormator-client)[ RSS](/packages/ss89-errormator-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

php-errormator-client
=====================

[](#php-errormator-client)

PHP Client for errormator.com - helps you track errors in your web and cli apps

you can easily add the php-errormator-client to your php app by doing the following:

```
require 'ErrormatorClient\ErrormatorClient.php';
$opts = array("apiKey" => $api_key); // where $api_key == YOUR API KEY
$client = new ErrormatorClient\ErrormatorClient($opts);

```

If you want to send a slow report, the data structure looks like:

```
$data = array(
        array(
            "url" => "http://127.0.0.1/errormator-test",
            "server" => "127.0.0.1",
            "report_details" => array(
                array(
                    "start_time" => date("Y-m-d\TH:i:s.u"),
                    "end_time" => date("Y-m-d\TH:i:s.u"),
                    "username" => "myUserName",
                    "url" => "http://127.0.0.1/errormator-test-url",
                    "ip" => "127.0.0.1",
                    "user_agent" => "Firefox 1",
                    "message" => "my custom message",
                    "request" => array("field1" => "value1", "field2" => "value2"),
                    "slow_calls" => array(
                        array(
                            "duration" => "11.1234",
                            "timestamp" => date("Y-m-d\TH:i:s.u"),
                            "type" => "sql",
                            "subtype" => "mysql",
                            "parameters" => array("param1", "param2", "param3"),
                            "statement" => "select * from mytable"
                        )
                    )
                )
            )
        )
    );
$client->slow($data);

```

keep in mind, that you can always post more than just one report with one request, just add another array into the first array.

If you want to send an error report, the data structure looks like:

```
$data = array(
        array(
            "traceback" => "my traceback as string",
            "priority" => 1,
            "error_type" => "OMG ValueError happened",
            "occurences" => 2,
            "http_status" => 500,
            "errormator.client" => "php",
            "errormator.client" => "php",
            "server" => "127.0.0.1",
            "report_details" => array(
                array(
                    "start_time" => date("Y-m-d\TH:i:s.u"),
                    "username" => "myUserName",
                    "url" => "http://127.0.0.1/errormator-test-url",
                    "ip" => "127.0.0.1",
                    "user_agent" => "Firefox blah",
                    "message" => "my custom message",
                    "request" => array(
                        "REQUEST_METHOD" => "GET",
                        "PATH_INFO" => "/FOO/BAR",
                        "POST" => array(
                            "field1" => "value1"
                        )
                    ),
                )
            )
        )
    );
$client->error($data);

```

and ofcourse the same rule applies here for sending more than just one report, you add another array in the first array

If you want to send a log, the data structure looks like:

```
$data =
            array(
                array(
                    "log_level" => "INFO",
                    "message" => "OMG ValueINFO happened",
                    "name" => "php.namespace.indicator",
                    "server" => "127.0.0.1",
                ),
                array(
                    "log_level" => "WARN",
                    "message" => "OMG ValueWARN happened",
                    "name" => "php.namespace.indicator",
                    "server" => "127.0.0.1",
                ),
                array(
                    "log_level" => "ERROR",
                    "message" => "OMG ValueERROR happened",
                    "name" => "php.namespace.indicator",
                    "server" => "127.0.0.1",
                )
            );
$client->log($data);

```

here you already see how you send more than 1 log

Using cakePHP? Try my AppError and AppLog class for the php-errormator-client in the subfolder cakePHP. Here is how to set it up [cakePHP set up errorhandlers](http://book.cakephp.org/2.0/en/development/errors.html)

Using no Framework? You're welcome too to look at noFramework\\example.php and noFramework\\example2.php :)

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3421699?v=4)[ss89](/maintainers/ss89)[@ss89](https://github.com/ss89)

---

Top Contributors

[![ss89](https://avatars.githubusercontent.com/u/3421699?v=4)](https://github.com/ss89 "ss89 (7 commits)")

### Embed Badge

![Health badge](/badges/ss89-errormator-client/health.svg)

```
[![Health](https://phpackages.com/badges/ss89-errormator-client/health.svg)](https://phpackages.com/packages/ss89-errormator-client)
```

PHPackages © 2026

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