PHPackages                             hivelink/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. hivelink/php

ActiveLibrary[API Development](/categories/api)

hivelink/php
============

HiveLink Operator Library for PHP!

v1.0.4(2y ago)0177↓50%1MITPHPPHP &gt;=5.2.0

Since Nov 7Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hivelinklib/hivelink-php)[ Packagist](https://packagist.org/packages/hivelink/php)[ Docs](http://github.com/HiveLinkLib/hivelink-php)[ RSS](/packages/hivelink-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (1)

 [ ![Logo](logo.png) ](https://github.com/HiveLinkLib/hivelink-php)

### HiveLink Library Php

[](#hivelink-library-php)

 Easy-to-use SDK for implementing Hivelink SMS API in your PHP projects.
 [**Explore the docs »**](https://notif.hivelink.co/docs)

 [English Document](#table-of-contents) | [مستندات فارسی](#table-of-contents-fa)

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

[](#table-of-contents)

- [Install](#install)
- [Usage](#usage)
    - [Parameters](#parameters)
    - [Example](#example)
- [One-Time Passwords (OTP)](#one-time-passwords-otp)
    - [Parameters](#parameters-1)
    - [Example](#example-1)
- [Licence](#license)

Install
-------

[](#install)

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

```
composer require hivelink/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 HiveLink SDK from [here](https://github.com/hivelinklib/hivelink-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 [Hivelink](https://notif.hivelink.co) 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 Hivelink class with your API key:

```
$api = new \Hivelink\HivelinkApi( 'your_api_key');
```

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

Send a sms:

```
$api->SendSimple(
 "09xxxxxxxxx", // receiver
 "9000xxxxx", // choose a line number from your account
 "This is a test!Hivelink", // message
);
```

Parameters
----------

[](#parameters)

ParameterRequiredDescriptionTypeExampletextYesText to be sentstringHello, World!receiverYesThe number of the receiver(s) of the message (set all receiver in array).string09110000000line\_numberNoIf the sender's number is not specified, the message will be selected from Highlink's dedicated lines with higher priority.**`(If you have specified lines, enter the desired line`**string9000\*\*\*\*dateNoThe exact date and time of sending the message based on Unix time, if not specified, the message will be sent instantly.string1671148877Example
-------

[](#example)

Here is a sample code for sending an SMS. Please note that if you are looking for a specific line, you must specify the `line number`.

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

try{
 $message = "This is a test!Hivelink";
 $lineNumber = null; // If you do not enter the line number, the message will be sent from the fastest HiveLink service line
 $receiver = "091xxxxxxxx"; // Use this method if sending to a mobile number
 $receiver = array("091********","092********"); // Use this method if sending to multiple mobile numbers
 $api = new \HiveLinkLib\HivelinkApi('api_key_developer');
 $api->SendSimple($lineNumber,$receiver,$message);
}
catch(\HiveLinkLib\Exceptions\ApiException $e){
 //If the response to the request is unsuccessful, this section will work
 echo $e->errorMessage();
}
catch(\HiveLinkLib\Exceptions\HttpException $e){
 //If there is a problem in communicating with the HiveLink web service, this section will work
 echo $e->errorMessage();
}
```

License
-------

[](#license)

Freely distributable under the terms of the [MIT](https://opensource.org/licenses/MIT) license.

فهرست مطالب
------------

[](#فهرست-مطالب-)

- [نصب](#install-fa)
- [استفاده](#usage-fa)
- [پارامترها](#parameters-fa)
- [نمونه کد](#example-fa)

- [رمز عبور یک‌بار مصرف](#otp-fa)
- [پارامترها](#parameters1-fa)
- [نمونه کد](#example1-fa)

- [مجوز](#licence-fa)

نصب
---

[](#نصب)

ساده‌ترین راه برای نصب این پکیج استفاده از Composer است:

```
composer require hivelink/php
```

 نحوه استفاده
--------------

[](#-نحوه-استفاده-)

برای استفاده از این پکیج می‌بایست API key داشته باشید. جهت دریافت ابتدا در [سامانه جامع هایولینک](https://`/) ثبت‌نام کنید و از پنل کاربری‌تان API key دریافت کنید.

سپس باید فایل autoload را به پروژه‌ی خود اضافه کنید:

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

یک instance از کلاس `Hivelink` با API key خود بسازید:

```
$api = new \Hivelink\HivelinkApi('your_api_key');
```

به خاطر داشته باشید که `your_api_key` را با کلید دریافتی از حساب هایولینک خود جایگزین کنید.

 پیامک دلخواه‌تان را ارسال کنید:

```
$api->SendSimple(
 "09xxxxxxxxx", // گیرنده پیام
 "9000xxxxx", // انتخاب خط ارسال کننده پیام ، در صورت وارد نکردن از خط با سرعت بالا استفاده میشود!
 "This is a test!Hivelink", // message
);
```

پارامترها
---------

[](#پارامترها)

پارامتراجباریتوضیحاتنوعمثالtextبلهمتنی که باید ارسال شود.stringاین یک تست می باشد!receiverبلهشماره گیرنده پیام می باشد.string09110000000line\_numberخیراگر شماره فرستنده مشخص نشده باشد، پیام از خطوط اختصاصی هایولینک با اولویت بالاتر انتخاب می شود.(در صورت داشتن خطوط مشخص، خط مورد نظر را وارد کنید)string9000\*\*\*dateخیرتاریخ و زمان دقیق ارسال پیام بر اساس Unixtime می باشد که اگر قید نشود در همان لحظه پیام ارسال می شود.string1671147631

نمونه کد
--------

[](#نمونه-کد)

 در اینجا یک نمونه کد برای ارسال پیامک آورده شده است. لطفا توجه داشته باشید که اگر به دنبال یک خط خاص هستید، باید "شماره خط" را مشخص کنید.

```
require __DIR__ . '/vendor/autoload.php';
try{
 $message = "این یک تست می باشد!هایولینک";
 $lineNumber = null; // اگر شماره خط را وارد نکنید، پیام از سریعترین خط سرویس هایولینک ارسال می شود
 $receiver = "091xxxxxxxx";
 $api = new \Hivelink\HivelinkApi('کلید توسعه دهنده');
 $api->SendSimple($lineNumber,&receiver,$message);
}
catch(\Hivelink\Exceptions\ApiException $e){
 //اگر پاسخ به درخواست ناموفق باشد، این بخش کار خواهد کرد
 echo $e->errorMessage();
}
catch(\Hivelink\Exceptions\HttpException $e){
//در صورت بروز مشکل در برقراری ارتباط با وب سرویس هایولینک ، این قسمت کار می کند
 echo $e->errorMessage();
}
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

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

922d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b831121d000eb3b5a24c7d560e8362b4a612acb92d93c34a4dfcea809d2983fa?d=identicon)[amoesmaeil](/maintainers/amoesmaeil)

---

Top Contributors

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

---

Tags

apiotpsmshivelink

### Embed Badge

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

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

###  Alternatives

[smsfactor/smsfactor-php-sdk

SMSFactor client library for PHP

15382.5k2](/packages/smsfactor-smsfactor-php-sdk)

PHPackages © 2026

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