Тема: PHP execute report
Hello everyone, I have a problem because I try to run a report using PHP code but it gives me "error 4" and I don't understand why if I can guide myself with the SDK documentation to do so.
I hope you can tell me what I'm wrong, thanks a lot
CODE
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
include('wialon.php');
$wialon_api = new Wialon();
$token = '43517c82b599a4153ffe18e8c9a20a00F7EC3DE7A022FCA49327AD3D6E38B75F2E1DDD8C';
$result = $wialon_api->login($token);
$json = json_decode($result, true);
if(!isset($json['error'])){
$params = array(
'spec' => array(
'reportResourceId' => 19554996,
'reportTemplateId' => 1,
'reportObjectId' => 16595473,
'reportObjectSecId' => 0,
'interval' => array(
'from' => 1561957200,
'to' => 1564635600,
'flags' => 1
)
)
);
echo $wialon_api->report_exec_report(json_encode($params));
$wialon_api->logout();
} else {
echo WialonError::error($json['error']);
}
?>
</body>
</html>