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許可證的許可。
