Skip to content
Pavel Zloi edited this page Aug 3, 2023 · 1 revision

RouterOS API PHP Library

Description

This library is a PHP-based API client for MikroTik's RouterOS. It provides developers with an easy-to-use interface to interact with RouterOS, which is an operating system running on MikroTik's network devices.

Features

  1. Easy to Use: The library abstracts the details of the underlying RouterOS API, providing a simple and intuitive interface for developers.
  2. Advanced Functions: The library supports all the basic operations like reading, writing, updating, and deleting RouterOS configurations. It also provides advanced functions for handling complex operations.
  3. Query Builder: A built-in query builder simplifies the process of building complex queries.
  4. Error Handling: The library provides robust error handling to ensure that any issues are immediately identified and reported back to the developer.
  5. Connection Management: The library automatically manages connections to the RouterOS devices, freeing developers from the need to manually manage these connections.
  6. Supports SSL/TLS: The library supports secure connections over SSL/TLS.

Getting Started

To get started, you'll first need to install the library via Composer:

composer require evilfreelancer/routeros-api-php

Then, you can create an instance of the client and start using it:

require 'vendor/autoload.php';

$api = new \RouterOS\Client([
    'host' => '192.168.88.1',
    'user' => 'admin',
    'pass' => 'password',
]);

$response = $api->write('/interface/print')->read();

Documentation

Full documentation is available on the project's GitHub page. It includes detailed instructions on how to use the library, as well as code samples and troubleshooting guides.

Contributing

Contributions are welcomed and appreciated. Please see the CONTRIBUTING.md file for more details on how to contribute to this project.

License

This project is licensed under the MIT License. For more information, please see the LICENSE file. Contact

For any questions or issues, please open an issue on the project's GitHub page, or contact the author directly.

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by MikroTik. All product and company names are the trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.