PHPackages                             ghasedaksms/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. [Mail &amp; Notifications](/categories/mail)
4. /
5. ghasedaksms/php

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

ghasedaksms/php
===============

a package for use ghasedaksms api services in php programming

v1.0.5(1y ago)12.6k↓60%1MITPHPPHP &gt;=8.2

Since Jul 21Pushed 1y ago2 watchersCompare

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

READMEChangelog (6)DependenciesVersions (7)Used By (1)

 [ ![Logo](https://raw.githubusercontent.com/ghasedakapi/ghasedak-php/master/g4php.png) ](https://github.com/ghasedakapi/ghasedaksms-php)

### Ghasedak PHP SDK

[](#ghasedak-php-sdk)

 Easy-to-use SDK for implementing Ghasedak SMS API in your PHP projects.
 [**Explore the docs »**](https://ghasedak.me/php)

 [Web Service Documents](https://ghasedak.me/developers) · [REST API](https://ghasedak.me/docs) . [Report Bug](https://github.com/ghasedakapi/ghasedaksms-php/issues) · [Request Feature](https://github.com/ghasedakapi/ghasedaksms-php/issues)

 [![contributors](https://camo.githubusercontent.com/c67fa238fa9850fa3eb98f17afb0600ad72118bc1af57f4cb6b7a9f2fcd3e090/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f676861736564616b6170692f676861736564616b736d732d7068702e737667)](https://github.com/ghasedakapi/ghasedaksms-php/graphs/contributors) [![forks](https://camo.githubusercontent.com/a10f8975e91d361cc9498076f5944c88e8f27a837740ce6299efe55459f0f539/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f676861736564616b6170692f676861736564616b736d732d7068702e737667)](https://github.com/ghasedakapi/ghasedaksms-php/network/members) [![stars](https://camo.githubusercontent.com/6a059e1c907b067706487a709ae221011443e8e12f6a9459702b725128f8457c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f676861736564616b6170692f676861736564616b736d732d7068702e737667)](https://github.com/ghasedakapi/ghasedaksms-php/stargazers) [![issues](https://camo.githubusercontent.com/5d431a92703d25541666ad9521f34be7df92dd47eaa601557a9b778aaa7fe3ba/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f676861736564616b6170692f676861736564616b736d732d7068702e737667)](https://github.com/ghasedakapi/ghasedaksms-php/issues) [![license](https://camo.githubusercontent.com/784362b26e4b3546254f1893e778ba64616e362bd6ac791991d2c9e880a3a64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)

 [English Document](#table-of-contents)

Table of Contents
-----------------

[](#table-of-contents)

- [Install](#install)
- [Usage](#usage)
    - [Send Single](#send-single)
    - [Send Bulk](#send-bulk)
    - [Send Pair To Pair](#send-pair-to-pair)
    - [Send OTP](#send-otp)
    - [Send OTP With Params](#send-otp-with-params)
    - [Check SMS Status](#check-sms-status)
    - [Get Account Information](#get-account-information)
    - [Get Received SMSes](#get-received-smses)
    - [Get Received SMSes Pagination](#get-received-smses-pagination)
    - [Get OTP Template Parameters](#get-otp-template-parameters)
- [Licence](#license)

Install
-------

[](#install)

The easiest way to install is by using [Composer](https://getcomposer.org/):

```
composer require ghasedaksms/php
```

Composer is a dependency manager for PHP which allows you to declare the libraries your project depends on, and it will manage (install/update) them for you. If you are not familiar with Composer, you can read its documentations and download it via [getcomposer.org](https://getcomposer.org/).

Alternatively you can download Ghasedak SDK from [here](https://github.com/ghasedakapi/ghasedaksms-php/archive/master.zip) and extract it in your project and follow the rest of the instructions below. Also there is an `Example` folder inside the package which you can use to understand the procedure.

Usage
-----

[](#usage)

To use the API, you need an API key. To get that you should have a [Ghasedak](https://ghasedak.me) account. Register and get your API key.

Then require the file autoload.php to get all classes and dependencies loaded.

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

Create an instance from Ghasedak class with your API key:

```
$ghasedaksms = new GhasedaksmsApi('your_api_key');
```

Don't forget to change `your_api_key` with the key you have got from your Ghasedak account.

Send Single
-----------

[](#send-single)

```
$sendDate = new DateTimeImmutable('now');
$lineNumber = '3000****';
$receptor = '0912*******';
$message = 'test';
try {
    $response = $ghasedaksms->sendSingle(new SingleMessageDTO(
        sendDate: $sendDate,
        lineNumber: $lineNumber,
        receptor: $receptor,
        message: $message
    ));
    var_dump($response);
} catch (Exceptions\GhasedakSMSException $e) {
    var_dump($e->getMessage());
}
```

Send Bulk
---------

[](#send-bulk)

```
$sendDate = new DateTimeImmutable('now');
$lineNumber = '3000****';
$receptor = ['0912*******','0919*******'];
$message = 'test';
try {
    $response = $ghasedaksms->sendBulk(new BulkMessageDTO(
        sendDate: $sendDate,
        lineNumber: $lineNumber,
        receptors: $receptor,
        message: $message
    ));
    var_dump($response);
} catch (Exceptions\GhasedakSMSException $e) {
    var_dump($e->getMessage());
}
```

Send Pair To Pair
-----------------

[](#send-pair-to-pair)

```
$sendDate = new DateTimeImmutable('now');
$lineNumber = '3000****';
$receptor1 = '0912*******';
$receptor2 = '0912*******';
$message1 = 'test1';
$message2 = 'test2';
try {
    $response = $ghasedaksms->sendPairToPair(new PairToPairMessageDTO(
        [
            new SingleMessageDTO(
                sendDate: $sendDate,
                lineNumber: $lineNumber,
                receptor: $receptor1,
                message: $message1
            ),
            new SingleMessageDTO(
                sendDate: $sendDate,
                lineNumber: $lineNumber,
                receptor: $receptor2,
                message: $message2
            )
        ]
    ));
    var_dump($response);
} catch (Exceptions\GhasedakSMSException $e) {
    var_dump($e->getMessage());
}
```

Send OTP
--------

[](#send-otp)

```
$sendDate = new DateTimeImmutable('now');
try {
    $response = $ghasedaksms->sendOtp(new OtpMessageDTO(
        sendDate: $sendDate,
        receptors: [
            new ReceptorDTO(
                mobile: '0912*******',
                clientReferenceId: '1'
            )
        ],
        templateName: 'newOtp',
        inputs: [
            new InputDTO(
                param: 'Code',
                value: 'value'
            ),
            new InputDTO(
                param: 'Name',
                value: 'value'
            )
        ]
    ));
    var_dump($response);
} catch (Exceptions\GhasedakSMSException $e) {
    var_dump($e->getMessage());
}
```

Send OTP With Params
--------------------

[](#send-otp-with-params)

```
$sendDate = new DateTimeImmutable('now');
try {
    $response = $ghasedaksms->sendOtpWithParams(new OtpMessageWithParamsDTO(
        sendDate: $sendDate,
        receptors: [
            new ReceptorDTO(
                mobile: '0912*******',
                clientReferenceId: '1'
            )
        ],
        templateName: 'newOtp',
        param1: 'param1',
        param2: 'param2'
    ));
    var_dump($response);
} catch (Exceptions\GhasedakSMSException $e) {
    var_dump($e->getMessage());
}
```

Check SMS Status
----------------

[](#check-sms-status)

```
try {
    $response = $ghasedaksms->checkSmsStatus(new CheckSmsStatusDTO(
        ids: ['246*****'],
        type: 1
    ));
    var_dump($response);
} catch (Exceptions\GhasedakSMSException $e) {
    var_dump($e->getMessage());
}
```

Get Account Information
-----------------------

[](#get-account-information)

```
try {
    $response = $ghasedaksms->getAccountInformation();
    var_dump($response);
} catch (Exceptions\GhasedakSMSException $e) {
    var_dump($e->getMessage());
}
```

Get Received SMSes
------------------

[](#get-received-smses)

```
try {
    $response = $ghasedaksms->getReceivedSMSes(
        new GetReceivedSMSesDTO(
            lineNumber: '3000****'
        )
    );
    var_dump($response);
} catch (Exceptions\GhasedakSMSException $e) {
    var_dump($e->getMessage());
}
```

Get Received SMSes Pagination
-----------------------------

[](#get-received-smses-pagination)

```
$startDate = new DateTimeImmutable('now');
$endDate = $startDate->modify('+3 days');
try {
    $response = $ghasedaksms->getReceivedSMSesPaging(
        new GetReceivedSMSesPagingDTO(
            lineNumber: '3000****',
            startDate: $startDate,
            endDate: $endDate,
            pageIndex: 0,
            pageSize: 10
        )
    );
    var_dump($response);
} catch (Exceptions\GhasedakSMSException $e) {
    var_dump($e->getMessage());
}
```

Get OTP Template Parameters
---------------------------

[](#get-otp-template-parameters)

```
try {
    $response = $ghasedaksms->getOtpTemplateParameters(
        new GetOtpTemplateParametersDTO(
            templateName: 'newOtp'
        )
    );
    var_dump($response);
} catch (Exceptions\GhasedakSMSException $e) {
    var_dump($e->getMessage());
}
```

License
-------

[](#license)

Freely distributable under the terms of the MIT license.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

Every ~26 days

Recently: every ~32 days

Total

6

Last Release

537d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f0b75306184ee576ee9326771f64d2afe4f83f30481c61db9b7945510af89742?d=identicon)[itsmrt\_\_\_\_](/maintainers/itsmrt____)

---

Top Contributors

[![mohamadmrt](https://avatars.githubusercontent.com/u/43780293?v=4)](https://github.com/mohamadmrt "mohamadmrt (10 commits)")

---

Tags

notificationsmssms apisms-gatewayGhasedakghasedaksms

### Embed Badge

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

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

###  Alternatives

[laravel-notification-channels/twilio

Provides Twilio notification channel for Laravel

2587.7M12](/packages/laravel-notification-channels-twilio)[ghasedak/php

ghasedak sms gateway package for PHP

2044.3k7](/packages/ghasedak-php)[gr8shivam/laravel-sms-api

A modern, flexible Laravel package for integrating any SMS gateway with REST API support

10138.4k](/packages/gr8shivam-laravel-sms-api)[hooman-mirghasemi/laravel-iran-sms

Laravel Sms

241.8k](/packages/hooman-mirghasemi-laravel-iran-sms)[taiwan-sms/every8d

every8d sms api client

1817.8k](/packages/taiwan-sms-every8d)

PHPackages © 2026

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