PHPackages                             bigbank/gcm-message - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. bigbank/gcm-message

ActiveLibrary[HTTP &amp; Networking](/categories/http)

bigbank/gcm-message
===================

A PHP library to send messages to devices registered through Google Cloud Messaging

1.0.1(9y ago)0103Apache-2.0PHPPHP &gt;=5.6

Since Jun 2Pushed 9y ago20 watchersCompare

[ Source](https://github.com/bigbank-as/GCM)[ Packagist](https://packagist.org/packages/bigbank/gcm-message)[ RSS](/packages/bigbank-gcm-message/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (4)Used By (0)

Google Cloud Messaging (GCM)
============================

[](#google-cloud-messaging-gcm)

A PHP library to send messages to devices registered through Google Cloud Messaging

See GCM documentation:

Example usage
-------------

[](#example-usage)

```
use Bigbank\Gcm\Sender;
use Bigbank\Gcm\Message;

$sender = new Sender("YOUR GOOGLE API KEY", $GcmEndpoint);

$message = new Message(
        ["device_registration_id1", "device_registration_id2"],
        ["data1" => "123", "data2" => "string"]
);

$message
    ->notification(["title" => "foo", "body" => "bar"])
    ->setCollapseKey("collapse_key")
    ->setDelayWhileIdle(true)
    ->setTtl(123)
    ->setRestrictedPackageName("com.example")
    ->setDryRun(true)
;

try {
    $response = $sender->send($message);
} catch (\Exception $exception) {
    throw new \Exception($exception->getMessage());
}
```

Note about cURL SSL verify peer option
--------------------------------------

[](#note-about-curl-ssl-verify-peer-option)

Library has turned off CURLOPT\_SSL\_VERIFYPEER by default, but you can enable it by passing third parameter into constructor of Sender class.

You need to [download](http://curl.haxx.se/docs/caextract.html) root certificates and add them somewhere into your project directory. Then construct Sender object like this:

```
use Bigbank\Gcm\Sender;

$sender = new Sender("YOUR GOOGLE API KEY", $GcmEndpoint, "/path/to/cacert.crt");
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Credits
-------

[](#credits)

- \[Bigbank's developers\]\[link-bb-developers\]
- \[All Contributors\]\[link-contributors\]

License
-------

[](#license)

The Apache 2 License. Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 80% 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

Total

2

Last Release

3554d ago

### Community

Maintainers

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

---

Top Contributors

[![aivarsomelar](https://avatars.githubusercontent.com/u/8894804?v=4)](https://github.com/aivarsomelar "aivarsomelar (4 commits)")[![jaakkytt](https://avatars.githubusercontent.com/u/2814704?v=4)](https://github.com/jaakkytt "jaakkytt (1 commits)")

---

Tags

gcmandroidiphonepush message

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/bigbank-gcm-message/health.svg)

```
[![Health](https://phpackages.com/badges/bigbank-gcm-message/health.svg)](https://phpackages.com/packages/bigbank-gcm-message)
```

###  Alternatives

[sly/notification-pusher

Standalone PHP library for easy devices notifications push.

1.2k2.8M16](/packages/sly-notification-pusher)[marcin-orlowski/laravel-api-response-builder

Helps building nice, normalized and easy to consume Laravel REST API.

838447.9k3](/packages/marcin-orlowski-laravel-api-response-builder)[paragraph1/php-fcm

PHP application server for google firebase cloud messaging (FCM)

1991.2M10](/packages/paragraph1-php-fcm)[codemonkeys-ru/gcm-message

Google Cloud Messaging (GCM) PHP Server Library

6289.3k](/packages/codemonkeys-ru-gcm-message)[kedniko/firebase-cloud-messaging-http-v1-php

Firebase cloud messaging http v1 php

124.5k](/packages/kedniko-firebase-cloud-messaging-http-v1-php)

PHPackages © 2026

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