Download the PHP package anandaerditya/routeros-api-php without Composer

On this page you can find all versions of the php package anandaerditya/routeros-api-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package routeros-api-php

Mikrotik RouterOS API PHP Module

Static Badge Packagist Version GitHub Release

This library is using API Client Communicator under PHP Socket, thanks to the repository from EvilFreelance. This library provides built-in methods based on the available configuration under Winbox, with their respective commands and parameters. At the moment, this library supports RouterBoard and Cloud Router Switch with pre-6.43 and post-6.43 versions of RouterOS, as mentioned in this repository.


Changelog

1.5.3 ( Bugfix )

  1. Add message handler for !trap, !re, !done, and !fatal type under the send() method.

1.4.2 ( Bugfix )

  1. Fix Mikrotik API response message handling under send() method;

1.3.22 ( Hotfix )

  1. Add new Exception : ErrorException;
  2. Add error handler for each method to catch any errors under mikrotik API.
  3. Add new methods :
    • ip_dhcp_server_lease()
    • ip_arp()
    • router_switch()
    • router_switch_port()

Requirements


How to Install

Under composer, just copy this command to begin add this library into your project.

composer require anandaerditya/routeros-api-php

Using the Library

If you are using Composer Project such Laravel Framework, you can just call the library under Erditya\RouterOSInstance class. As follows :

Or, another way to approach :


Available Methods

List of all methods available in this library at this version :

  1. General

    • connect()
    • is_connected()
  2. Interface

    • interface_bridge()
    • interface_bridge_port()
    • interface_bridge_port()
    • interface_ethernet()
    • interface_list()
    • interface_list_member()
    • interface_vlan()
  3. IP

    • ip_addresses()
    • ip_dhcp_server()
    • ip_dhcp_server_network()
    • ip_dns()
    • ip_firewall_filter()
    • ip_firewall_nat()
    • ip_hotspot_user_profiles()
    • ip_hotspot_users()
    • ip_hotspot_server_profiles()
    • ip_hotspot_servers()
    • ip_hotspot_ip_binding()
    • ip_pool()
    • ip_route()
    • ip_services()
  4. System

    • system_identity()
    • system_user_groups()
    • system_users()
  5. Switch (for Cloud Router Switch only)
    • switch_crs_egress_vlan_tag()
    • switch_crs_mac_based_vlan()
    • switch_crs_port()

Commands & Parameters, and Response

All the methods provided in this library are similar to Winbox's CLI terminal. You can check them under Winbox for more information. All the methods using the command print as the default returned the response as an array. If you call the method using another command, such as add, set, remove, etc., the method will return true, which indicates it was successfully executed.



All versions of routeros-api-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
evilfreelancer/routeros-api-php Version ^1.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package anandaerditya/routeros-api-php contains the following files

Loading the files please wait ....