PHPackages                             serverdox/serverdox-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. serverdox/serverdox-php

ActiveLibrary

serverdox/serverdox-php
=======================

The Serverdox SDK provides methods for all API functions.

v1.0(10y ago)018MITPHPPHP &gt;=5.3.0

Since Sep 16Pushed 10y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Serverdox-PHP
=============

[](#serverdox-php)

This is the Serverdox PHP SDK. This SDK contains methods for easily interacting with the Serverdox API. Below are examples to get you started. For additional examples, please see our official documentation at

[![Latest Stable Version](https://camo.githubusercontent.com/76bd2e4f101f6d291ed415a37ba9a0712e1de624f9a48681899c605eacf7944a/68747470733a2f2f706f7365722e707567782e6f72672f736572766572646f782f736572766572646f782d7068702f762f737461626c652e706e67)](https://packagist.org/packages/serverdox/serverdox-php)

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

[](#installation)

To install the SDK, you will need to be using [Composer](http://getcomposer.org/) in your project. If you aren't using Composer yet, it's really simple! Here's how to install composer and the Serverdox SDK.

```
# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add Serverdox as a dependency
php composer.phar require serverdox/serverdox-php:~1.0
```

**For shared hosts without SSH access, check out our [Shared Host Instructions](SharedHostInstall.md).**

**Rather just download the files? [Library Download](https://www.serverdox.com/download/sdk/serverdox-php-v1.0.zip).**

Next, require Composer's autoloader, in your application, to automatically load the Serverdox SDK in your project:

```
require 'vendor/autoload.php';
use Serverdox\Serverdox;
```

Usage
-----

[](#usage)

Here's how to create a monitor using the SDK:

```
# First, instantiate the SDK with your API credentials.
$serverdox = new Serverdox("api-key-here");

# Now, create your monitor.
$serverdox->monitors->create(array(
    "name"                      => "Google",
    "url"                       => "https://www.google.com",
    "monitor_server_location"   => "NYC",
    "notes"                     => "My notes about Google.",
    "contacts"                  => array(
        "contact-id-here" => array(
            "sms" => true
        )
    ),
    "me_contact"                => true
));
```

Or list the 2 most recent monitors created:

```
# First, instantiate the SDK with your API credentials and define your domain.
$serverdox = new Serverdox("api-key-here");

# Now, get the monitors.
$serverdox->monitors->all(array(
    'limit' => 2
));
```

Response
--------

[](#response)

JSON will be returned in all responses from the API, including errors.

Example:

```
$serverdox = new Serverdox("api-key-here");

$monitors = $serverdox->monitors->all(array(
    'limit' => 2
));

echo '', print_r($monitors), '';
```

Example Contents:
**$monitors** will contain JSON of the API response. In the above example, something like the following would be displayed:

```
{
    "monitors": [
        {
            "id": "M_XXXXXXXXXXXXXXXX",
            "name": "Google",
            "url": "https://www.google.com",
            "monitor_server_location": "NYC",
            "current_status": "Pending",
            "notes": "My notes about Google.",
            "run": true,
            "contacts": [
                {
                    "me": false,
                    "C_XXXXXXXXXXXXXXXX": {
                        "email": false,
                        "sms": true,
                        "twitter": false
                    }

                }
            ],
            "created_at": 1420070401
        },
        {
            "id": "M_XXXXXXXXXXXXXXXX",
            "name": "Serverdox",
            "url": "https://www.serverdox.com",
            "monitor_server_location": "LON",
            "current_status": 200,
            "run": true,
            "contacts": [
                {
                    "me": true,
                },
                {
                    "me": false,
                    "C_XXXXXXXXXXXXXXXX": {
                        "email": true,
                        "sms": true,
                        "twitter": false
                    }
                }
            ],
            "created_at": 1420070400
        }
    ],
    "remaining": 3,
    "livemode": true
}
```

Testing
-------

[](#testing)

We aim to make testing our PHP SDK as simple as possible and the only change you need to make is to your API key.

To use the SDK in test mode simply put **"test\_"** before your API key, e.g. **"test\_XXXXXXXXXXXXXXXX"**.

In test mode most aspects of the API remain the same including account limits, API limits and errors. However, it is not possible to attach a test contact to a live monitor and vice versa. Trying to retrieve the logs of a monitor in test mode will return an error as this is also not possible in test mode.

Retrieving a test object via the API will have a JSON attribute: **"livemode": false**.

Support and Feedback
--------------------

[](#support-and-feedback)

Be sure to visit the Serverdox official [API documentation](https://www.serverdox.com/api/docs) for additional information about our API.

If you find a bug, please submit the issue in Github directly. [Serverdox-PHP Issues](https://github.com/serverdox/serverdox-php/issues)

As always, if you need additional assistance, contact us at [https://serverdox.com/contact](https://www.serverdox.com/contact).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3889d ago

Major Versions

v0.7 → v1.02015-09-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/5cb9a48e1500ef56a206c8fde371bd2e733f3762eaad2128812650fd1720666d?d=identicon)[adawoo](/maintainers/adawoo)

---

Top Contributors

[![adawoo](https://avatars.githubusercontent.com/u/12251441?v=4)](https://github.com/adawoo "adawoo (1 commits)")

### Embed Badge

![Health badge](/badges/serverdox-serverdox-php/health.svg)

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

PHPackages © 2026

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