Skip to content

Instantly share code, notes, and snippets.

View ProdigyTech's full-sized avatar

Javar Alexander ProdigyTech

View GitHub Profile
@joashp
joashp / PushNotifications.php
Last active June 3, 2024 15:38
Simple PHP script to send Android Push Notification, iOS Push Notification and Windows Phone 8 Push Notification
<?php
// Server file
class PushNotifications {
// (Android)API access key from Google API's Console.
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI';
// (iOS) Private key's passphrase.
private static $passphrase = 'joashp';
// (Windows Phone 8) The name of our push channel.
private static $channelName = "joashp";
@MohammadaliMirhamed
MohammadaliMirhamed / PhpFireBaseNotificationSample.php
Last active May 28, 2024 11:37
firebase notification sample in php . if you like this code follow me and star it . i will follow you and use your codes and share them . 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. To use the script, just call
<?php
#API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = $_GET['id'];
#prep the bundle
$msg = array
(
'body' => 'Body Of Notification',
@ProdigyTech
ProdigyTech / PushNotifications.php
Last active April 2, 2017 17:16
Simple PHP script to send an Android Device push notifications using Firebase Cloud Messaging API
class PushNotifications{
private static $API_ACCESS_KEY = "YOUR_FCM_SERVER_KEY ";
public function __construct() {
// exit('Init function is not allowed');
}
public function android($data, $reg_id) {
$url = 'https://fcm.googleapis.com/fcm/send';
$message = array
(
'title' => $data['mtitle'],
@DejanBelic
DejanBelic / async await ie11.js
Last active May 11, 2023 15:09
How to use async await in ie11
// Async await func
async function getTimelineData() {
var response = await fetch('/some-api-url')
return response.json()
}
async function populateTimelineInit() {
var data = await getTimelineData();
new vis.DataSet(data);