1. Go to this page and download the library: Download mivodev/mikrotik-api-ros7 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mivodev / mikrotik-api-ros7 example snippets
use Mivo\MikrotikRos7\Client;
$api = new Client();
$api->connect('192.168.1.1', 'admin', 'password');
// Using Native REST Methods
$identity = $api->get('/rest/system/identity');
print_r($identity);
// Using Legacy CLI Mapping
$users = $api->comm('/ip/hotspot/user/print');
print_r($users);