1. Go to this page and download the library: Download classmarkets/statsd 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/ */
classmarkets / statsd example snippets
$statsd = new \Classmarkets\Statsd;
$statsd->gauge("my.favorite.numbers", 73); // see what I did there?
$statsd = new \Classmarkets\Statsd;
$statsd->count('sheep', 3);
$statsd = new \Classmarkets\Statsd;
$statsd->timeThis('critical.query', function() use ($db) {
$db->executeCriticalQuery();
});
$statsd = new \Classmarkets\Statsd('localhost', 7000); // default localhost:8125