Hello
what is the commande that i need to add an user in hotspot with limitation TX/RX
i’m using php
thanks
Hello
what is the commande that i need to add an user in hotspot with limitation TX/RX
i’m using php
thanks
Rate limitations need to be defined per user profile, not per user. Once you have a profile, you just make sure to assign the new user to that profile. Technically, you could create a new profile for each and every user, but this is likely to make the router slower under heavy load, not to mention that it will consume more memory.
The easiest way, using the PHP client from my signature:
<?php
use PEAR2\Net\RouterOS;
require_once 'PEAR2_Net_RouterOS-1.0.0b5.phar';
$util = new RouterOS\Util($client = new RouterOS\Client('192.168.88.1', 'admin', 'password'));
//To add a profile
$util->setMenu('/ip hotspot user profile')->add(
array(
'name' => 'profile1',
'rate-limit' => '10M/2M' //10M max download rate; 2M max upload rate
)
);
//To add a user with "profile1" limitations
$util->setMenu('/ip hotspot user')->add(
array(
'name' => 'user1',
'password' => 'user1password',
'profile' => 'profile1'
)
);
Thanks a lot i will try it ![]()