2017 © Pedro Peláez
 

library firebasecmclient

PHP Library Client Firebase Cloud Messaging

image

amrikasir/firebasecmclient

PHP Library Client Firebase Cloud Messaging

  • Thursday, July 20, 2017
  • by amrikasir
  • Repository
  • 0 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Firebase Cloud Messaging PHP Client Library

Install dulu dari composer:, (*1)

>$ composer require amrikasir/firebasecmclient

baru deh di PHPnya., (*2)

<?php
require_once __DIR__ . '/vendor/autoload.php';

use ald\FirebaseCM;
use ald\Push;

SET Push Parameter, (*3)

$push = new Push(
    "ALD Push Notification", //Title
    "dari: " . $_SERVER['HTTP_HOST'] //Message
);

SET Server Key, (*4)

$notification = new FirebaseCM(
    //this is key from server Firebase Cloud Messaging Console
    //and this is new Server key
    "SERVER_KEY_FROM_FCM_CONSOLE"

    //old legacy server key
    //"OR_LEGACY_SERVER_KEY"
);

Finaly..., (*5)

SET Server Key, (*6)

echo $notification->send(
    //This is token from client (Android / iOS)
    //You can store this token in mysql server or other dbms
    array(
        'REGISTRATION_TOKEN',
        'OTHER_REGISTRATION_TOKEN'
    ),
    $push->getPush()
);

Dibuat untuk keperluan internal tim., (*7)

jika butuh, dan (kalau bisa) kembangkan menjadi lebih baik., (*8)

The Versions

20/07 2017

dev-master

9999999-dev

PHP Library Client Firebase Cloud Messaging

  Sources   Download

GPL-3.0

The Requires

  • php ^5.6.0

 

by Al Amrikasir

notification firebase andalas

20/07 2017

v1.0

1.0.0.0

PHP Library Client Firebase Cloud Messaging

  Sources   Download

GPL-3.0

The Requires

  • php ^5.6.0

 

by Al Amrikasir

notification firebase andalas