janmeier / gcm-sender
light weight library to send Google Cloud Messages (GCM) using PHP & curl.
dev-master
2015-11-03 10:36 UTC
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: 4.5.*
This package is not auto-updated.
Last update: 2024-09-24 08:07:48 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!