PHP code example of jlis / quickmetrics-php
1. Go to this page and download the library: Download jlis/quickmetrics-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/ */
jlis / quickmetrics-php example snippets
// create the client
$client = new \Jlis\Quickmetrics\Client('quickmetrics api key');
// collect the event
$client->event('event.name', 1.0, 'dimension');
// send the event to Quickmetrics.io
$client->flush();
$client = new \Jlis\Quickmetrics\Client('your api key', [
'url' => 'https://someotherurl.tld',
'max_batch_size' => 10,
'timeout' => 5,
'connect_timeout' => 2,
]);
bash
composer