Skip to content

Instantly share code, notes, and snippets.

View rhafiko's full-sized avatar

Najib El Alam rhafiko

View GitHub Profile
{
"transfer": "Transfer",
"transaction_feed": "Transaction Feed",
"change_name": "Change Name"
}
@rhafiko
rhafiko / PhpFireBaseNotificationSample.php
Last active July 25, 2020 19:52 — forked from MohammadaliMirhamed/PhpFireBaseNotificationSample.php
forked from MohammadaliMirhamed/PhpFireBaseNotificationSample.php -Simple PHP FireBase (FCM) script showing how to send an Android push notification. -Be sure to replace the SERVER_API_ACCESS_KEY with a proper one from the Google API's Console page. -Create project on firebase console, It returns me Server Accesss key and Legacy key under Projec…
<?php
#API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = $_GET['id'];
$topic = $_GET['topic'];
#prep the bundle
$msg = array
(
'body' => 'Body Of Notification',