https://github.com/daffadevhosting/mikrotik-lite-php
📡 Mikrotik API client super ringan untuk PHP, Kompatibel RouterOS v6 dan v7. Tidak perlu Composer, tidak ribet, cukup `require` dan langsung jalan!
https://github.com/daffadevhosting/mikrotik-lite-php
mikrotik php-client routeros
Last synced: 3 months ago
JSON representation
📡 Mikrotik API client super ringan untuk PHP, Kompatibel RouterOS v6 dan v7. Tidak perlu Composer, tidak ribet, cukup `require` dan langsung jalan!
- Host: GitHub
- URL: https://github.com/daffadevhosting/mikrotik-lite-php
- Owner: daffadevhosting
- License: other
- Created: 2025-05-18T17:30:24.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-05-27T04:14:38.000Z (8 months ago)
- Last Synced: 2025-05-27T05:19:48.579Z (8 months ago)
- Topics: mikrotik, php-client, routeros
- Language: PHP
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mikrotik-lite-php
📡 Mikrotik API client super ringan untuk PHP.
Tidak perlu Composer, tidak ribet, cukup `require` dan langsung jalan!
```php -S localhost:1111```
## 🚀 Fitur
🔒 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
## 💻 Contoh Penggunaan
```php
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);
```
## 📂 Struktur
- `src/` → Kode utama library
- `examples/` → Contoh file penggunaan
- `RouterOSClient.php` → Kelas utama komunikasi API
## 🛠️ Roadmap
- [x] Koneksi via socket
- [x] Login challenge-response
- [x] Kirim command dasar
- [x] Parse data `!re` → array terstruktur
- [x] Command helper: `add()`, `remove()`, `enable()`
- [x] Handle error `!trap`
- [x] Test Connect `!trap`
## 📄 License
MIT — bebas dipakai, ubah, dan dibagikan.