Hi masters.
I have a microtic router. This includes pppoe-server. My clients connect to the internete here. I can view the details of a customer in the interface section as follows.
As I pointed out in the picture, it is possible to read where the customer is connected via the interface.
But… :put [/ interface get 30] does not have interface information on output when I run command. The output is as follows.
<?php
use PEAR2\Net\RouterOS;
require_once 'PEAR2_Net_RouterOS-1.0.0b6.phar';
$client = new RouterOS\Client('192.168.88.1', 'admin', 'password');
$request = new RouterOS\Request('/interface pppoe-server monitor');
$request->setArgument('numbers', '<pppoe-user>')->setArgument('once');
////Or if you are not accepting user input, you can also just use
//$request = new RouterOS\Request('/interface pppoe-server monitor numbers="<pppoe-user>" once');
$response = $client->sendSync($request);
echo $response->getProperty('interface');