PHPackages                             tldev-de/mygeotab-php - 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. [API Development](/categories/api)
4. /
5. tldev-de/mygeotab-php

ActiveLibrary[API Development](/categories/api)

tldev-de/mygeotab-php
=====================

Unofficial fork of unofficial PHP client for the MyGeotab API

1.1.5(4y ago)04.5k↓33.3%2Apache-2.0PHPPHP &gt;=7.1.0

Since Mar 29Pushed 4y agoCompare

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

READMEChangelog (5)Dependencies (3)Versions (8)Used By (0)

MyGeotab PHP API Client
=======================

[](#mygeotab-php-api-client)

> ⚠️ This is an unofficial fork of the unofficial php api client. It equals the unofficial php client except the versions of some dependencies (`guzzlehttp/guzzle` and `monolog/monolog`) to make them compatible with modern php applications.

[![Build Status](https://camo.githubusercontent.com/7d7816cbef49873838aac2f93849b7f62add4e1b2ba7d76a5bc67e462155ef25/68747470733a2f2f7472617669732d63692e6f72672f47656f7461622f6d7967656f7461622d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Geotab/mygeotab-php)[![Packagist](https://camo.githubusercontent.com/df8b80746382c8a9227ba5d3a59fcee8195e4e831f692ffc8172607831ae704e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f67656f7461622f6d7967656f7461622d7068702e737667)](https://packagist.org/packages/geotab/mygeotab-php)

Provides a PHP client that can easily make API requests to a MyGeotab server.

Installation
------------

[](#installation)

You can use [composer](https://getcomposer.org/) and run the following command in your repo:

```
composer install mygeotab-php

```

This repository requires PHP &gt;=7.1, but if you're going to try integrate this into older versions then you can look at the code in `src` directly.

Quick start
-----------

[](#quick-start)

```
$api = new Geotab\API("user@example.com", "password", "DatabaseName", "my.geotab.com");
$api->authenticate();

$api->get("Device", ["resultsLimit" => 1], function ($results) {
    var_dump($results);
}, function ($error) {
    var_dump($error);
});
```

Instead of using the callback syntax, you can simply use the return result directly. Keep in mind, if an error occurs you won't be informed! It will throw as a `MyGeotabException`, so remember to use try &amp; catch.

```
$toDate = new DateTime();
$fromDate = new DateTime();
$fromDate->modify("-1 month");

try {
    $violations = $api->get("DutyStatusViolation", [
        "search" => [
            "userSearch" => ["id" => "b1"],
            "toDate" => $toDate->format("c"),   // ISO8601, or could use "2018-11-03 00:53:29.370134"
            "fromDate" => $fromDate->format("c")
        ],
        "resultsLimit" => 10
    ]);
} catch (Exception $e) {
    // Handle this or return
}

echo "The driver has " . count($violations) . " violations!";
```

Examples
--------

[](#examples)

In the `examples` folder, you can see the "Top Speeding Violations" example that was presented in the [Dev Channel video](https://www.geotab.com/video/mygeotab-php-api-client/). The code is not yet hooked up with the Node server and will likely have difficulty with PSR, but the code is there and should be easy to understand.

Trick: PHP-CGI NodeJS server
----------------------------

[](#trick-php-cgi-nodejs-server)

If you have a PHP-CGI handler installed, you can run a web server with just `server.js` in NodeJS. I found this quick and easy on Windows instead of setting up a complex web server.

First, find the php-cgi executable on your machine (e.g. C:\\Program Files\\PHP\\v7.2\\php-cgi.exe) and place that in the file. Then run:

```
npm install
node server.js

```

Should now visit localhost:8080/sample.php and voila - you're serving PHP from a NodeJS server!

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 84.9% 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.

###  Release Activity

Cadence

Every ~331 days

Recently: every ~68 days

Total

7

Last Release

1704d ago

PHP version history (2 changes)1.0.0PHP &gt;=5.3.3

1.1.0PHP &gt;=7.1.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/11870921?v=4)[Tobi](/maintainers/tldev-de)[@tldev-de](https://github.com/tldev-de)

---

Top Contributors

[![colonelchlorine](https://avatars.githubusercontent.com/u/1085938?v=4)](https://github.com/colonelchlorine "colonelchlorine (45 commits)")[![tldev-de](https://avatars.githubusercontent.com/u/11870921?v=4)](https://github.com/tldev-de "tldev-de (7 commits)")[![phste](https://avatars.githubusercontent.com/u/3936215?v=4)](https://github.com/phste "phste (1 commits)")

---

Tags

apisdkgeotabmygeotab

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tldev-de-mygeotab-php/health.svg)

```
[![Health](https://phpackages.com/badges/tldev-de-mygeotab-php/health.svg)](https://phpackages.com/packages/tldev-de-mygeotab-php)
```

###  Alternatives

[checkout/checkout-sdk-php

Checkout.com SDK for PHP

553.3M7](/packages/checkout-checkout-sdk-php)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[kucoin/kucoin-futures-php-sdk

PHP SDK for KuCoin Futures API

111.9k](/packages/kucoin-kucoin-futures-php-sdk)

PHPackages © 2026

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