1. Go to this page and download the library: Download hellofresh/stats-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/ */
hellofresh / stats-php example snippets
use HelloFresh\Stats\Factory;
$statsdClient = Factory::build('statsd://statsd-host:8125/prefix?timeout=2.5&error=1', $logger);
// php parse_url does not support url with only schema part set
$logClient = Factory::build('log://log', $logger);
// php parse_url does not support url with only schema part set
$noopClient = Factory::build('noop://noop', $logger);
// php parse_url does not support url with only schema part set
$memoryClient = Factory::build('memory://memory', $logger);
// php parse_url does not support url with only schema part set
$statsClient = Factory::build(getenv('STATS_DSN'), $logger);