rakibas375/mikrotik-php
Composer 安装命令:
composer require rakibas375/mikrotik-php
包简介
A PHP class for managing MikroTik users via API. This package allows you to add, remove, and update users, monitor their status (online/offline), and manage their bandwidth and packages on MikroTik routers. It simplifies integration with MikroTik routers and helps automate the process of user manage
README 文档
README
A PHP class for managing MikroTik users via API. This package allows you to add, remove, and update users, monitor their status (online/offline), and manage their bandwidth and packages on MikroTik routers. It simplifies integration with MikroTik routers and helps automate the process of user management in an ISP billing system.
Features
- User Management: Add, remove, or update users on MikroTik routers.
- Bandwidth Management: Monitor and manage user bandwidth and speed limits.
- Online/Offline Monitoring: Check user status (online or offline).
- API Integration: Easy integration with MikroTik routers via their API.
Installation
To install the package, you can use Composer:
composer require rakibas375/mikrotik-php <?php require 'vendor/autoload.php'; use Rakib\Mikrotik\MikrotikAPI; // Create an instance of the class $mk = new MikrotikAPI(); // Add a user to MikroTik router $userInfo = [ 'username' => 'newuser', // The username for the new user 'password' => 'password123', // The password for the new user 'profile' => 'default', // The profile to assign the user (e.g., bandwidth profile) 'routerIp' => '192.168.88.1', // The IP address of the MikroTik router ]; // Add the user and get the response from MikroTik $response = $mk->user_add($userInfo); // Print the response from MikroTik API (success or error message) echo $response; Methods user_add($userInfo) This method is used to add a new user to the MikroTik router. Parameters: $userInfo (array): An associative array containing user details such as username, password, and profile. $userInfo = [ 'username' => 'newuser', 'password' => 'password123', 'profile' => 'default', 'routerIp' => '192.168.88.1', ]; $mk->user_add($userInfo); get_all_online_users() This method retrieves all users who are currently online. $onlineUsers = $mk->get_all_online_users(); echo "Currently online users: " . implode(', ', $onlineUsers); get_all_offline_users() This method retrieves all users who are currently offline. $offlineUsers = $mk->get_all_offline_users(); echo "Currently offline users: " . implode(', ', $offlineUsers);
rakibas375/mikrotik-php 适用场景与选型建议
rakibas375/mikrotik-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 02 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 rakibas375/mikrotik-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 rakibas375/mikrotik-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 21
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2025-02-23