Skip to content
MagnusSolution edited this page Oct 21, 2021 · 3 revisions

Read last calls from user 24320.

<?php
require_once "vendor/autoload.php";

use magnusbilling\api\magnusBilling;

$magnusBilling             = new MagnusBilling('API KEY', 'SECRET KEY');
$magnusBilling->public_url = "http://1.1.1.1/mbilling"; // Your MagnusBilling URL

//get ID for username 24320 
$id_user = $magnusBilling->getId('user', 'username', '24320');

//set the filter to get calls from $id_user
$magnusBilling->setFilter('id_user', $id_user, 'eq', 'numeric');

/*
On read method, the second parameter is the page, 
1 is the last 25 data, 2 is the next page.
Each page show 25 data
*/
$result = $magnusBilling->read('call',1);

print_r($result);
Clone this wiki locally