PHP code example of fakiolinho / updown-php

1. Go to this page and download the library: Download fakiolinho/updown-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

fakiolinho / updown-php example snippets



Foinikas\Updown\Updown;

$updown = new Updown(API_KEY);

$response = $updown->checks();


Foinikas\Updown\Updown;

$updown = new Updown(API_KEY);

$response = $updown->check(TOKEN);


Foinikas\Updown\Updown;

$updown = new Updown(API_KEY);

$response = $updown->downtimes(TOKEN);
$response = $updown->downtimes(TOKEN, ['page' => 2]);


Foinikas\Updown\Updown;

$updown = new Updown(API_KEY);

$response = $updown->metrics(TOKEN);
$response = $updown->metrics(TOKEN, ['group' => 'host']);
bash
composer 
json
"kiolinho/updown-php": "~1.0"
}