1. Go to this page and download the library: Download bennito254/routeros-client 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/ */
use Bennito254\RouterOS\Laravel\Facade as RouterOS;
$response = RouterOS::query('/ip/address/print');
use Bennito254\RouterOS\Facade\IpAddress;
use Bennito254\RouterOS\Facade\HotspotUser;
// Using the IpAddress Facade
$ipFacade = new IpAddress($client);
// Get all IP Addresses
$addresses = $ipFacade->getAll();
// Add a new IP Address
$ipFacade->add([
'address' => '10.0.0.1/24',
'interface' => 'ether2',
]);
// Disable a Hotspot user by their RouterOS `.id`
$hotspotFacade = new HotspotUser($client);
$hotspotFacade->disable('*1F');