PHP code example of nesquick / metrics

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

    

nesquick / metrics example snippets


use Metrics\Client;

$client = new Client('[email protected]', '...');
$client->post('/metrics', array(
  'gauges' => array(
    array('name' => 'metric1', 'value' => 123)
  )
));