2017 © Pedro Peláez
 

library php-uptimerobot

PHP Wrapper for UptimeRobot.com API

image

ckdarby/php-uptimerobot

PHP Wrapper for UptimeRobot.com API

  • Tuesday, February 27, 2018
  • by ckdarby
  • Repository
  • 2 Watchers
  • 31 Stars
  • 2,999 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 3 Versions
  • 6 % Grown

The README.md

PHP Wrapper For UptimeRobot.com

This is a basic PHP wrapper for https://uptimerobot.com/api, (*1)

Prerequisites

  • Configure the $config apiKey
  • Must be running PHP >= 5.4
  • Format will be JSON & there will be no JSONCallback

Composer

Add this to your composer.json, (*2)

{
    "require": {
        "ckdarby/php-uptimerobot": "@stable"
    }
}

Example

<?php
//Requires composer install to work
require_once(__DIR__.'/vendor/autoload.php');

use UptimeRobot\API;

//Set configuration settings
$config = [
    'apiKey' => 'APIKEY',
    'url' => 'https://api.uptimerobot.com'
];

try {

    //Initalizes API with config options
    $api = new API($config);

    //Define parameters for our getMethod request
    $args = [
        'showTimezone' => 1
    ];

    //Makes request to the getMonitor Method
    $results = $api->request('/getMonitors', $args);

    //Output json_decoded contents
    var_dump($results);

} catch (Exception $e) {
    echo $e->getMessage();
    //Output various debug information
    var_dump($api->debug);
}

The Versions

27/02 2018

dev-master

9999999-dev https://github.com/ckdarby/PHP-UptimeRobot/

PHP Wrapper for UptimeRobot.com API

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

27/02 2018

v0.2.0

0.2.0.0 https://github.com/ckdarby/PHP-UptimeRobot/

PHP Wrapper for UptimeRobot.com API

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *

 

25/10 2014

v0.1.0

0.1.0.0 https://github.com/ckdarby/PHP-UptimeRobot/

PHP Wrapper for UptimeRobot.com API

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-curl *