2017 © Pedro Peláez
 

library mikrotik-api

Mikrotik API PHP Library for working with RouterOS API

image

anovob/mikrotik-api

Mikrotik API PHP Library for working with RouterOS API

  • Wednesday, July 4, 2018
  • by anovob
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

mikrotik-api

Instalation

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
}

Basic Usage:

```$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 ]); }
Created by anovob (A S M Saief)
(cc) 2018
License: MIT

The Versions

04/07 2018

dev-master

9999999-dev

Mikrotik API PHP Library for working with RouterOS API

  Sources   Download

MIT

The Requires

  • php >=7.0.0

 

api mikrotik routeros