π‘ Mikrotik API client super ringan untuk PHP.
Tidak perlu Composer, tidak ribet, cukup require
dan langsung jalan!
php -S localhost:1111
π Support dual login: challenge-based (lama) dan direct login (baru)
π Auto detect saat koneksi
β Kompatibel RouterOS v6 dan v7
- Koneksi langsung ke API Mikrotik (port 8728)
- Kirim perintah & baca respons (
/ip/hotspot/user/print
, dll) - Ringan, tanpa dependensi eksternal
require_once __DIR__ . '/../src/RouterOSClient.php';
use MikroTikLite\RouterOSClient;
$api = new RouterOSClient('192.168.88.1', 'admin', '');
$api->connect();
$response = $api->send('/ip/hotspot/user/print');
print_r($response);
src/
β Kode utama libraryexamples/
β Contoh file penggunaanRouterOSClient.php
β Kelas utama komunikasi API
- Koneksi via socket
- Login challenge-response
- Kirim command dasar
- Parse data
!re
β array terstruktur - Command helper:
add()
,remove()
,enable()
- Handle error
!trap
- Test Connect
!trap
MIT β bebas dipakai, ubah, dan dibagikan.