dev-master
9999999-devMikrotik API PHP Library for working with RouterOS API
MIT
The Requires
- php >=7.0.0
by A S M Saief
api mikrotik routeros
Mikrotik API PHP Library for working with RouterOS API
Via composer:, (*1)
composer require anovob/mikrotik-api
Or manually insert this block into your composer.json in require section:, (*2)
"require": { "anovob/mikrotik-api": "dev-master", // <- this line }
```$php use MikrotikAPI\Roar\Roar;, (*3)
// create a connection with Mikrotik Router, (*4)
$conn = Roar::create(['host_ip', 'port', 'username', 'password']);, (*5)
if($conn->isConnected()) { // you have access to Commands // and can call from here... }, (*6)
Getting interfaces: --- ```$php use MikrotikAPI\Roar\Roar; use MikrotikAPI\Commands\Interfaces; $conn = Roar::create(['host_ip', 'port', 'username', 'password']); if($conn->isConnected()) { $iComm = new Interfaces($conn); $interfaces = $iComm->getAll() // returns all interfaces as array // you can send it to view return view("<some_view>", [ 'interfaces' => $interfaces ]); }
Mikrotik API PHP Library for working with RouterOS API
MIT
api mikrotik routeros