1. Go to this page and download the library: Download checkmango/php-sdk 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/ */
checkmango / php-sdk example snippets
$client = new Checkmango\Client();
$client->authenticate('your_api_token');
$organizations = $client->organizations()->list();
$organization = $client->organizations($organizationId);
$config = $organization->config();
$experiment = $organization->experiments()->show('EXPERIMENT_KEY');
// Enroll the participant and track an impression for the selected variant.
$organization->ingest()->store('EXPERIMENT_KEY', 'PARTICIPANT_KEY', 'VARIANT_KEY');
// Track a conversion, optionally supplying a revenue value.
$organization->ingest()->store('EXPERIMENT_KEY', 'PARTICIPANT_KEY', 'VARIANT_KEY', 'EVENT_KEY');
$organization->ingest()->store('EXPERIMENT_KEY', 'PARTICIPANT_KEY', 'VARIANT_KEY', 'REVENUE_EVENT', 29.95);
$organization = $client->organizations($organizationId)->show();
$organization = $client->organizations()->show($organizationId);
$currentOrganization = $client->currentOrganization();
$user = $client->user();
$health = $client->health(); // Does not