Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

nkeenan38/phpingdom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pingdom REST API

A PHP library for the Pingdom API.

Installation

Install the library using composer by adding the following to composer.json in the root of your project:

{ 
    "require": {
        "nkeenan38/phppingdom": "1.0.*"
    }
}

Use the generated vendor/.composer/autoload.php file to autoload the library classes.

Basic usage

You will need a Pingdom application key for authorizatioon. Follow their documentation to generate an application key inside the Pingdom control panel.

<?php

$token    = ''; // Pingdom application key (32 characters)

$pingdom = new \Pingdom\Client($token);

// List of probe servers
$probes = $pingdom->getProbes();
foreach ($probes as $probe) {
    echo $probe->getName() . PHP_EOL;
}

// List of checks
$checks  = $pingdom->getChecks();
foreach ($checks as $check) {
    $results = $pingdom->getResults($check['id']);
}

About

A PHP library for the Pingdom API.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages