【问题标题】:Mikrotik Hotspot PHP APIMikrotik 热点 PHP API
【发布时间】:2016-05-19 04:10:36
【问题描述】:

我正在使用 Mikrotik 的 php api,但如果用户断开连接,我不如何控制不运行限制正常运行时间?

这是我的代码

$API->write("/ip/hotspot/user/add", false);
$API->write("=name=".$usuario, false);
$API->write("=limit-uptime=".$segundos, false);
$API->write("=password=".$password, true);

【问题讨论】:

    标签: php api mikrotik hotspot


    【解决方案1】:

    从RouterOS v6.34版本开始,您应该使用以下API命令:

    ip hotspot active login user="user" password="password" mac-address="AA:BB:CC:00:1122" ip="10.5.50.1"
    

    如果您知道设备的 MAC 地址,则必须在 ARP 中搜索设备分配的 IP。

    另外我强烈建议使用PEAR2/Net/RouterOS 库,它比你使用的旧版本要简单得多。

    祝你好运;)

    【讨论】:

      【解决方案2】:

      用户热点配置中有一个“Keep-Alive”选项可控制此行为。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多