1. Go to this page and download the library: Download madnesscode/voluum 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/ */
madnesscode / voluum example snippets
use MadnessCODE\Voluum;
$email = '[email protected]';
$password = 'test';
$client = new Voluum\Client\API(new Voluum\Auth\PasswordCredentials($email, $password));
$report_api = new Voluum\API($client);
$access_key_id = "access_key_id";
$access_key = "access_key";
$client = new Voluum\Client\API(new Voluum\Auth\AccessKeyCredentials($access_key_id, $access_key));
$report_api = new Voluum\API($client);
$result = $report_api->get("report", [
"from" => date("Y-m-d"),
"to" => date("Y-m-d"),
"groupBy" => "campaign"
]);
//Get result as json
echo $result->getJson();
//Get result as object
var_dump($result->getData());