PHPackages                             rakibas375/mikrotik-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. rakibas375/mikrotik-php

ActiveLibrary[API Development](/categories/api)

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 management in an ISP billing system

10PHP

Since Feb 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/fiverrrakib2017/mikrotik-api)[ Packagist](https://packagist.org/packages/rakibas375/mikrotik-php)[ RSS](/packages/rakibas375-mikrotik-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

MikroTik PHP API Class
======================

[](#mikrotik-php-api-class)

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
--------

[](#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
------------

[](#installation)

To install the package, you can use Composer:

```
composer require rakibas375/mikrotik-php

 '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);
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/630357a702e75d0987a4be40e11c9422c4c09c9cf2dffa1c96a160f9ba142b2f?d=identicon)[fiverrrakib2017](/maintainers/fiverrrakib2017)

---

Top Contributors

[![fiverrrakib2017](https://avatars.githubusercontent.com/u/75886816?v=4)](https://github.com/fiverrrakib2017 "fiverrrakib2017 (11 commits)")

### Embed Badge

![Health badge](/badges/rakibas375-mikrotik-php/health.svg)

```
[![Health](https://phpackages.com/badges/rakibas375-mikrotik-php/health.svg)](https://phpackages.com/packages/rakibas375-mikrotik-php)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M475](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M452](/packages/google-gax)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
