2017 © Pedro Peláez
 

library push-notifier

Send push notifications from PHP to multiple device types

image

infi-nl/push-notifier

Send push notifications from PHP to multiple device types

  • Wednesday, July 15, 2015
  • by edeckers
  • Repository
  • 9 Watchers
  • 1 Stars
  • 45 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Push Notifier

PHP library for sending push notifications to multiple device types., (*1)

Apple Push Notification example

Prepare the PushNotifier for sending Apple Push Notifications. Note that you can provide your own Pusher-strategies, to send notifications for Android and Windows Phone for example., (*2)

$pushNotifier = new PushNotifier(
  new PusherStrategyCollection(array(
      new ApnPusher(
          'ssl://gateway.sandbox.push.apple.com:2195',
          '<path-to-pem-file>'
      )
  ))
);

Sending an Apple Push Notification, (*3)

$message              = new ApnMessage();
$message->body        = "<my message>";
$message->badge       = 0;
$message->deviceToken = "<device token>";

$pushNotifier->push($message);

Google Cloud Messaging example

Prepare the PushNotifier for sending Google Cloud Messages., (*4)

$pushNotifier = new PushNotifier(
  new PusherStrategyCollection(array(
      new GcmPusher(
        'https://android.googleapis.com/gcm/send',
        '<api-key>'
      )
  ))
);

Sending a Google Cloud Message, (*5)

$message                  = new GcmMessage();
$message->message         = "<my message>";
$message->title           = "<my title>";
$message->registrationIds = array("<registrationId 1>", "<registrationId 2>", ... , "<registrationId n>");

$pushNotifier->push($message);

The Versions

15/07 2015

dev-features/aps_feedback

dev-features/aps_feedback

Send push notifications from PHP to multiple device types

  Sources   Download

MIT

by Ely Deckers

15/07 2015

dev-master

9999999-dev

Send push notifications from PHP to multiple device types

  Sources   Download

MIT

by Ely Deckers

15/07 2015

v1.0-beta.1

1.0.0.0-beta1

Send push notifications from PHP to multiple device types

  Sources   Download

MIT

by Ely Deckers