PHP code example of sgrodzicki / pingdom

1. Go to this page and download the library: Download sgrodzicki/pingdom 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/ */

    

sgrodzicki / pingdom example snippets




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

$pingdom = new \Pingdom\Client($username, $password, $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']);
}



name = '[your username]';
$password = '[your password]';
$token    = '[your token]';
 bash
curl -s http://getcomposer.org/installer | php
php composer.phar install
 bash
phpunit --bootstrap credentials.php