PHPackages                             amidesfahani/php-rest-sdk - 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. amidesfahani/php-rest-sdk

ActiveLibrary[API Development](/categories/api)

amidesfahani/php-rest-sdk
=========================

IPPanel REST API client

042PHP

Since May 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/amidesfahani/php-rest-sdk)[ Packagist](https://packagist.org/packages/amidesfahani/php-rest-sdk)[ RSS](/packages/amidesfahani-php-rest-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

IPPanel SMS php api SDK
=======================

[](#ippanel-sms-php-api-sdk)

This repository contains open source PHP client for `ippanel` api. Documentation can be found at: .

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

[](#installation)

use with composer:

```
composer require amidesfahani/php-rest-sdk
```

Examples
--------

[](#examples)

For using sdk, you have to create a client instance that gives you available methods on API

```
require 'autoload.php';

// you api key that generated from panel
$apiKey = "api-key";

$client = new \IPPanel\Client($apiKey);

...
```

### Credit check

[](#credit-check)

```
# return float64 type credit amount
$credit = $client->getCredit();
```

### Send one to many

[](#send-one-to-many)

For sending sms, obviously you need `originator` number, `recipients` and `message`.

```
$bulkID = $client->send(
    "+9810001",          // originator
    ["98912xxxxxxx"],    // recipients
    "ippanel is awesome" // message
);
```

If send is successful, a unique tracking code returned and you can track your message status with that.

### Get message summery

[](#get-message-summery)

```
$bulkID = "message-tracking-code";

$message = $client->get_message($bulkID);

echo $message->status;   // get message status
echo $message->cost;     // get message cost
echo $message->payback;  // get message payback
```

### Get message delivery statuses

[](#get-message-delivery-statuses)

```
$bulkID = "message-tracking-code"

list($statuses, $paginationInfo) = $client->fetchStatuses($bulkID, 0, 10)

// you can loop in messages statuses list
foreach($statuses as status) {
    echo sprintf("Recipient: %s, Status: %s", $status->recipient, $status->status);
}

echo sprintf("Total: ", $paginationInfo->total);
```

### Inbox fetch

[](#inbox-fetch)

fetch inbox messages

```
list($messages, $paginationInfo) = $client->fetchInbox(0, 10);

foreach($messages as $message) {
    echo sprintf("Received message %s from number %s in line %s", $message->message, $message->sender, $message->number);
}
```

### Pattern create

[](#pattern-create)

For sending messages with predefined pattern(e.g. verification codes, ...), you hav to create a pattern. a pattern at least have a parameter. parameters defined with `%param_name%`.

```
$pattern = $client->createPattern("%name% is awesome", False);

echo $pattern->code;
```

### Send with pattern

[](#send-with-pattern)

```
$patternValues = [
    "name" => "IPPANEL",
];

$bulkID = $client->sendPattern(
    "t2cfmnyo0c",    // pattern code
    "+9810001",      // originator
    "98912xxxxxxx",  // recipient
    $patternValues,  // pattern values
);
```

### Error checking

[](#error-checking)

```
use IPPanel\Errors\Error;
use IPPanel\Errors\HttpException;

try{
    $bulkID = $client->send("9810001", ["98912xxxxx"], "ippanel is awesome");
} catch (Error $e) { // ippanel error
    var_dump($e->unwrap()); // get real content of error
    echo $e->getCode();

    // error codes checking
    if ($e->code() == ResponseCodes::ErrUnprocessableEntity) {
        echo "Unprocessable entity";
    }
} catch (HttpException $e) { // http error
    var_dump($e->getMessage()); // get stringified error
    echo $e->getCode();
}
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity30

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/5d9ed461878eff3be19c9bfd4158e246a2a02f3728fa9589d8d48b61867fc2b0?d=identicon)[amidesfahani](/maintainers/amidesfahani)

---

Top Contributors

[![amidesfahani](https://avatars.githubusercontent.com/u/61671721?v=4)](https://github.com/amidesfahani "amidesfahani (1 commits)")

### Embed Badge

![Health badge](/badges/amidesfahani-php-rest-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/amidesfahani-php-rest-sdk/health.svg)](https://phpackages.com/packages/amidesfahani-php-rest-sdk)
```

###  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.1M453](/packages/google-gax)

PHPackages © 2026

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