Http api documentation onlinepbx.ru
Download zip archive and require Autoloader.php
require_once 'lib/Autoloader.php';
Composer (guide)
Add require item to your project composer.json:
"xtratio/onlinepbx-api": "~1.0"
or command line:
composer require xtratio/onlinepbx-api
// Create new client object
$api = new xtratio\Onpbx\ApiClient(
"yourdomain.onpbx.ru",
"api key"
);
// Get call history
$from = (new DateTime())->modify("-1 day")->format("r");
$to = (new DateTime())->format("r");
$result = $api->callHistory(array("date_from"=>$from,"date_to"=>$to));