2017 © Pedro Peláez
 

library routeros

A fluent interface to the MikroTik RouterOS API.

image

eugenevdm/routeros

A fluent interface to the MikroTik RouterOS API.

  • Monday, November 21, 2016
  • by eugenevdm
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

routeros

A fluent interface to the MikroTik RouterOS API., (*1)

Example Usage | Testing | Changelog | Links, (*2)

Installation

Winbox

http://myhomelab.blogspot.co.za/2013/05/installing-mikrotik-routeros-under-VirtualBox.html, (*3)

Example Usage

<?php

require_once __DIR__ . '/../../vendor/autoload.php'; // Autoload files using Composer autoload

use Monitor\Monitor;
use Routeros\Routeros;

$router = new Routeros(); // Create new API instance
//$router->debug(); // Turn on debugging

$monitor = new Monitor(); // Initialise monitoring

$monitor->start();
echo $router->version() . "\n"; // Get router version information (/system/resource/print)
$monitor->show(); // Display the amount of time it took to get this info

echo $router->uptime() . "\n"; // Get router uptime information. Uses a saved variable
$monitor->show(); // Show how much quicker this happened

echo $router->resource('cpu-load') . "\n"; // An alternative way to get the CPU load

$queues = $router->queue()->simple()->pr(); // Get the result of /queue/simple/print
// print_r ($queues);

echo $router->credentials() . "\n"; // Return current credentials in use for the API in JSON format
echo $router->ping($router->ip_address); // Ping current IP address of API router

Testing

The command below will link to a public router and run this API command /interface/getall, (*4)

php tests/main.php 

Changelog

  • Fixed API for PhpStorm to avoid warnings

During the construction of this library various links were followed., (*5)

  • http://blog.jgrossi.com/2013/creating-your-first-composer-packagist-package/
  • https://github.com/BenMenking/routeros-api/blob/master/routeros_api.class.php
  • http://wiki.mikrotik.com/wiki/API_PHP_class

The Versions

21/11 2016

dev-master

9999999-dev

A fluent interface to the MikroTik RouterOS API.

  Sources   Download

MIT

The Requires

 

by Eugene van der Merwe

17/11 2016

dev-temp

dev-temp

A fluent interface to the MikroTik RouterOS API.

  Sources   Download

MIT

The Requires

 

by Eugene van der Merwe

16/11 2016

1.0.4

1.0.4.0

A fluent interface to the MikroTik RouterOS API.

  Sources   Download

MIT

The Requires

 

by Eugene van der Merwe

16/11 2016

1.0.3

1.0.3.0

A fluent interface to the MikroTik RouterOS API.

  Sources   Download

MIT

The Requires

 

by Eugene van der Merwe

15/11 2016

1.0.2

1.0.2.0

A fluent interface to the MikroTik RouterOS API.

  Sources   Download

MIT

by Eugene van der Merwe

15/11 2016

1.0.1

1.0.1.0

A fluent interface to the MikroTik RouterOS API.

  Sources   Download

MIT

by Eugene van der Merwe

14/11 2016

1.0

1.0.0.0

A fluent interface to the MikroTik RouterOS API.

  Sources   Download

MIT

by Eugene van der Merwe