utopialib php
1.0.25

乌托邦网络API的PHP库。
composer require sagleft/utopialib-php $ token = " 3D4F4A5E34706378B4A4541502E603B6 " ;
$ client = new UtopiaLib Client ( $ token , " http://127.0.0.1 " , 22824 );
print_r ( $ client -> getSystemInfo ());结果:
Array
(
[result] => Array
(
[buildAbi] => x86_64-little_endian-llp64
[buildCpuArchitecture] => x86_64
[build_number] => 0.3.5115
[currentCpuArchitecture] => x86_64
[netCoreRate] => 25
[networkCores] => 1
[networkEnabled] => 1
[numberOfConnections] => 9
[packetCacheSize] => 7320
[uptime] => 02:30:09
)
[resultExtraInfo] => Array
(
[elapsed] => 0
)
)
如何运行示例
cp example.env .env然后在.env中输入您的数据以连接到客户端。然后打开examples文件夹。
示例(在命令行):
php CheckConnection.php您可以在主类的接口中找到有关所有方法的更多信息。
为了方便起见,库中的所有方法的名称与乌托邦API中的名称相同。
其他方法:
Utopialib获得了MIT许可证的许可。
