PHP code example of statful / statful-client-php
1. Go to this page and download the library: Download statful/statful-client-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/ */
statful / statful-client-php example snippets
#!php
$metricNamespace = 'business';
$metricName = 'wager';
$metricTags = array(
'transaction' => 'create',
'platform' => 'desktop',
'action' => 'bet',
);
$metricValue = 100;
$client = new StatfulClient('127.0.0.1', '2014', 'business', 'production');
$client->put($metricName, $metricValue, $metricTags, $metricNamespace);
$client->send();