janmeier / gcm-sender
light weight library to send Google Cloud Messages (GCM) using PHP & curl.
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
pkg:composer/janmeier/gcm-sender
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: 4.5.*
This package is not auto-updated.
Last update: 2025-11-04 13:29:36 UTC
README
Send GCM Messages via PHP and handle the Result-Codes. Super lightweight!
Module Requirements:
- php5-curl
Usage Example
Just add it to your composer-file!
Example composer.json file here:
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/Jan1337z/GCM-via-PHP"
}
],
"require": {
"GCMSender": "dev-master"
}
}
possible index.php
<?php require 'vendor/autoload.php'; $sender = new GCM\Sender("YOUR_API_KEY"); $sender->setRecipients(array("a_android_client_registration_id")); $sender->sendMessage(array("message" => "some_content")); ?>
more following!