PHPackages                             afaztech/ibsngrpc - 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. afaztech/ibsngrpc

ActiveLibrary[API Development](/categories/api)

afaztech/ibsngrpc
=================

IBSng API XML-RPC client for PHP

v1.0.0(1y ago)3113MITPHPPHP &gt;=7.4

Since May 9Pushed 1y ago1 watchersCompare

[ Source](https://github.com/AfazTech/IBSNGrpc)[ Packagist](https://packagist.org/packages/afaztech/ibsngrpc)[ Docs](https://github.com/afaztech/IBSngrpc)[ RSS](/packages/afaztech-ibsngrpc/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

IBSNGrpc
========

[](#ibsngrpc)

IBSNGrpc is a PHP library designed specifically for interacting with [AfazTech/IBSng](https://github.com/AfazTech/IBSng) subscriber management system via XML-RPC. Note that this package is built for this specific version of IBSng and may not be compatible with other versions.

This library provides a comprehensive set of methods for managing various aspects of the IBSng system. Contributions and improvements from the community are welcome!

[ ![](https://camo.githubusercontent.com/6172dcfba6291a8708f0f4162f69dbd651851f1d047ec49573514d5e59127bed/687474703a2f2f7777772e636f6666656574652e69722f696d616765732f627574746f6e732f6c656d6f6e63686966666f6e2e706e67)](http://www.coffeete.ir/afaz)Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Requirements](#requirements)
- [Usage](#usage)
- [Available Methods](#available-methods)
    - [IP Pool Management](#ip-pool-management)
    - [User Management](#user-management)
    - [Messaging](#messaging)
    - [RAS Management](#ras-management)
    - [VoIP Tariff Management](#voip-tariff-management)
    - [Definitions Management](#definitions-management)
    - [Permission Management](#permission-management)
    - [Bandwidth Management](#bandwidth-management)
    - [Admin Management](#admin-management)
    - [Snapshot Management](#snapshot-management)
    - [Report Management](#report-management)
    - [Charge Management](#charge-management)
    - [Group Management](#group-management)
    - [Miscellaneous](#miscellaneous)
- [License](#license)
- [Error Handling](#error-handling)

Installation
------------

[](#installation)

To install this library using Composer, run the following command:

```
composer require AfazTech/IBSNGrpc
```

Requirements
------------

[](#requirements)

- PHP 7.4 or higher
- PHP extensions:
    - curl
    - xmlrpc
- Composer (installed globally)

Verify required extensions with:

```
php -m | grep -E 'curl|xmlrpc'
```

Usage
-----

[](#usage)

```
require 'vendor/autoload.php';

use IBSNGrpc\Client;

// Initialize client
$ip = 'IBSNG_SERVER_IP';
$port = 'IBSNG_SERVER_PORT'; // Typically 1235
$username = 'USERNAME'; // e.g., 'system'
$password = 'PASSWORD';
$authType = 'ADMIN'; // Optional, default is 'ADMIN'

$ibsng = new Client($ip, $port, $username, $password, $authType);

// Example: Add a new user
$response = $ibsng->addNewUser(
    $count = 1,
    $credit = 1,
    $group_name = '30d',
    $owner_name = 'system',
    $credit_comment = "Initial credit"
);

if ($response['success']) {
    $userId = $response['data'][0];
    echo "User created with ID: $userId";
} else {
    throw new Exception("Error: " . $response['error']);
}

// Example: Change user password
$response = $ibsng->changePassword(
    $userId,
    'newusername',
    'securepassword123'
);

if ($response['success']) {
    echo "Username and password updated successfully!";
} else {
    throw new Exception("Error: " . $response['error']);
}
```

Available Methods
-----------------

[](#available-methods)

### IP Pool Management

[](#ip-pool-management)

MethodDescriptionParameters`addNewIPpool`Add a new IP pool`$ippool_name`, `$comment``updateIPpool`Update an existing IP pool`$ippool_id`, `$ippool_name`, `$comment``getIPpoolNames`Get list of all IP pool names-`getIPpoolInfo`Get information about a specific IP pool`$ippool_name``deleteIPpool`Delete an IP pool`$ippool_name``delIPfromPool`Remove an IP from a pool`$ippool_name`, `$ip``addIPtoPool`Add an IP to a pool`$ippool_name`, `$ip`### User Management

[](#user-management)

MethodDescriptionParameters`addNewUser`Add new user(s)`$count`, `$credit`, `$group_name`, `$owner_name`, `$credit_comment``getUserInfoByID`Get user info by ID`$user_id``getUserInfoByUsername`Get user info by username`$username``updateUserAttrs`Update user attributes`$user_id`, `$attrs`, `$to_del_attrs``changeUserCredit`Change user credit`$user_id`, `$credit`, `$credit_comment``delUser`Delete a user`$user_id`, `$delete_comment`, `$del_connection_logs`, `$del_audit_logs``searchUser`Search for users`$conds`, `$from`, `$to`, `$order_by`, `$desc``changePassword`Change user password`$user_id`, `$username`, `$password``lockUser`Lock a user`$user_id`, `$lock_reason``unlockUser`Unlock a user`$user_id``changeUsergroup`Change user's group`$user_id`, `$new_group_name`### RAS Management

[](#ras-management)

MethodDescriptionParameters`addNewRas`Add new RAS`$ras_ip`, `$ras_description`, `$ras_type`, `$radius_secret`, `$comment``getRasInfo`Get RAS information`$ras_ip``updateRasInfo`Update RAS information`$ras_id`, `$ras_ip`, `$ras_description`, `$ras_type`, `$radius_secret`, `$comment``getActiveRasIPs`Get active RAS IPs-`addIPpoolToRas`Add IP pool to RAS`$ras_ip`, `$ippool_name`### VoIP Management

[](#voip-management)

MethodDescriptionParameters`addNewVoIPTariff`Add VoIP tariff`$tariff_name`, `$comment``addVoIPTariffPrefix`Add prefix to tariff`$tariff_name`, `$prefix_codes`, `$prefix_names`, `$cpms`, `$free_seconds`, `$min_durations`, `$round_tos`, `$min_chargable_durations``getVoIPTariffInfo`Get tariff info`$tariff_name`, `$include_prefixes`, `$name_regex`### Bandwidth Management

[](#bandwidth-management)

MethodDescriptionParameters`addBwInterface`Add bandwidth interface`$interface_name`, `$comment``addBwNode`Add bandwidth node`$interface_name`, `$parent_id`, `$rate_kbits`, `$ceil_kbits``updateBwLeaf`Update bandwidth leaf`$leaf_id`, `$leaf_name`, `$default_rate_kbits`, `$default_ceil_kbits`, `$total_rate_kbits`, `$total_ceil_kbits`### Admin Management

[](#admin-management)

MethodDescriptionParameters`addNewAdmin`Add new admin`$username`, `$password`, `$name`, `$comment``changeAdminPassword`Change admin password`$admin_username`, `$new_password``lockAdmin`Lock admin account`$admin_username`, `$reason`### Report Management

[](#report-management)

MethodDescriptionParameters`getOnlineUsers`Get online users`$normal_sort_by`, `$normal_desc`, `$voip_sort_by`, `$voip_desc`, `$conds``getConnections`Get connection reports`$conds`, `$from`, `$to`, `$sort_by`, `$desc``getCreditChanges`Get credit changes`$conds`, `$from`, `$to`, `$sort_by`, `$desc`Error Handling
--------------

[](#error-handling)

All methods return an array with the following structure:

```
[
    'success' => bool,    // Whether the operation was successful
    'data' => mixed,      // Response data if successful
    'error' => string     // Error message if unsuccessful
]
```

Example error handling:

```
$response = $ibsng->getUserInfoByID(123);

if (!$response['success']) {
    throw new Exception("Failed to get user info: " . $response['error']);
}

$userData = $response['data'];
```

License
-------

[](#license)

This project is licensed under the MIT License. See the [LICENSE](https://github.com/AfazTech/IBSNGrpc/blob/main/LICENSE) file for details.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance49

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity37

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

374d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/69a193cfdda61e7981d7ed0d451533a35edf52421f0d4f8c789d715a6d160a9b?d=identicon)[afaztech](/maintainers/afaztech)

---

Top Contributors

[![AfazTech](https://avatars.githubusercontent.com/u/106348299?v=4)](https://github.com/AfazTech "AfazTech (6 commits)")

---

Tags

ibsngibsng apiibsng xml rpcphp ibsng api

### Embed Badge

![Health badge](/badges/afaztech-ibsngrpc/health.svg)

```
[![Health](https://phpackages.com/badges/afaztech-ibsngrpc/health.svg)](https://phpackages.com/packages/afaztech-ibsngrpc)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

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

A PHP wrapper for Twilio's API

1.6k92.9M272](/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.1M454](/packages/google-gax)

PHPackages © 2026

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