cwteam / wialon
Wialon 远程 API PHP 库。
v1.0.0
2016-07-08 17:47 UTC
Requires
- php: >=5.4.0
This package is not auto-updated.
Last update: 2024-09-23 15:25:31 UTC
README
Wialon
- 允许根据 文档 执行任何 Wialon 远程 API 请求。需要 cUrl。
WialonError
- 简单地将 Wialon 错误代码转换为文本消息。
用法
use CWTeam\Wialon\Wialon;
use CWTeam\Wialon\WialonError;
$wialon_api = new Wialon();
// old username and password login is deprecated, use token login
$token = 'Your token here';
$result = $wialon_api->login($token);
$json = json_decode($result, true);
if(!isset($json['error'])){
echo $wialon_api->core_search_item('{"id":717359,"flags":0x1}');
$wialon_api->logout();
} else {
echo WialonError::error($json['error']);
}