PHPackages                             push-notification/push-notification-php-library - 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. push-notification/push-notification-php-library

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

push-notification/push-notification-php-library
===============================================

Send push notification to android|ios devices , support APNs, FCM

v1.4(2y ago)221.5k6MITPHPPHP &gt;=5.6CI failing

Since Sep 26Pushed 11mo ago1 watchersCompare

[ Source](https://github.com/Azhovan/push-notification-library)[ Packagist](https://packagist.org/packages/push-notification/push-notification-php-library)[ RSS](/packages/push-notification-push-notification-php-library/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (2)Versions (6)Used By (0)

> **⚠️ This repository is archived and no longer maintained.**
>
> The code is provided as-is, without any guarantees of updates or support.

Push Notification Library for php
=================================

[](#push-notification-library-for-php)

Standalone PHP library for easy devices message notifications push.
**Feel free to contribute!**

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

[](#installation)

```
composer require push-notification/push-notification-php-library
composer dump-autoload -o

```

This repository uses PSR-0 autoload. After installation with composer please adjust you autoloading config if needed or include vendor/autoload.php in your index.php.

**Requirements:**

> - PHP 5.6+
> - PHP Curl and OpenSSL modules

> **available supports:**
>
> - APNS (Apple)
> - GCM (Android) and FCM (Android)

### Setting

[](#setting)

1. settings of your provider (Apn, Fcm) at **.env**(make sure you renamed the .env.example to .env and filled all the requirements)
2. path to .env file : you need to set **$path** variable at `src/PushNotification/Setting` to the .env file

### How to use :

[](#how-to-use-)

```
include_once "vendor/autoload.php";

use PushNotification\Service\PushService;

$data = array(
    'device' => array(
        'name' => '', // Android or AppleIOS
        'token' => '', // device token | user token , if you want to send to apple device you have to fill this
        'id' => 'unique id here'),

    'message' => array(
        'action' => 'test',
        'title' => 'this is test title',
        'targets' => array(''), // if you want to use Fcm you can inclue array of targets
        'body' => 'this is body',
        'type' => '', // AndroidMessages or IOSMessages
        'data' => array('type' => 'testType'))
);

$response  = PushService::getInstance()->send($data);
```

### Android :

[](#android-)

```
include_once "vendor/autoload.php";

use PushNotification\Service\PushService;

$data = array(
    'device' => array(
        'name' => 'Android',
        'token' => '',
        'id' => 'some id here '),

    'message' => array(
        'action' => 'test',
        'title' => 'this is test title',
        'targets' => array('token1', 'token2', 'token3'),
        'body' => 'this is body',
        'type' => 'AndroidMessages',
        'data' => array('type' => 'testType'))
);
$response  = PushService::getInstance()->send($data);
print_r($response);
```

### IOS :

[](#ios-)

```
include_once "vendor/autoload.php";

use PushNotification\Service\PushService;

$data = array(
    'device' => array(
        'name' => 'AppleIOS',
        'token' => 'token',
        'id' => 'BECDSx'),

    'message' => array(
        'action' => 'test',
        'title' => 'this is test title',
        'targets' => array(),
        'body' => 'this is body',
        'type' => 'IOSMessages',
        'data' => array('type' => 'testType'))
);
$response  = PushService::getInstance()->send($data);
print_r($response);
```

###  Health Score

37

—

LowBetter than 84% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~552 days

Total

5

Last Release

890d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/02379d52dcd773bcc20062ad4e871a9cb76c2408954c61fc3983a73bb4a169b9?d=identicon)[asadijabar](/maintainers/asadijabar)

---

Top Contributors

[![Azhovan](https://avatars.githubusercontent.com/u/19530589?v=4)](https://github.com/Azhovan "Azhovan (3 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

androidapnsautoloadfcmiosnotification-librarynotificationsphpservermessagepushnotificationgcmpusherappleandroidiphoneapns

### Embed Badge

![Health badge](/badges/push-notification-push-notification-php-library/health.svg)

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

###  Alternatives

[sly/notification-pusher

Standalone PHP library for easy devices notifications push.

1.2k2.8M16](/packages/sly-notification-pusher)[duccio/apns-php

Apple Push Notification &amp; Feedback Provider

1.4k2.5M13](/packages/duccio-apns-php)[mcfedr/awspushbundle

A set of services to simplify using Aws to send push notifications

40376.4k1](/packages/mcfedr-awspushbundle)[witty/laravel-push-notification

Laravel 5 Package for sending push notifications to Android and iOS devices

295.0k](/packages/witty-laravel-push-notification)

PHPackages © 2026

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