Skip to content

Instantly share code, notes, and snippets.

View pokurivijay's full-sized avatar
🎯
Focusing

Vijay Pokuri pokurivijay

🎯
Focusing
View GitHub Profile
@pokurivijay
pokurivijay / gist:8351008
Created January 10, 2014 12:20
Test Gist
This is a Test Gist.
@pokurivijay
pokurivijay / gist:d5f5645617a282c2de44b4a6e8d00c8d
Created April 6, 2018 09:24 — forked from prime31/gist:5675017
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
{"cards":[{"id":"2","author_id":"1","title":"aaron-burden-304587","data_format":"image","card_type":"greeting_welcome","video_url":"","text":"greeting_welcome_text","slug":"aaron-burden-304587","credits":"PC: Unsplash.com","created":"2018-05-06 00:00:00","updated_at":"2017-12-16 17:11:16","solution_reply_id":null,"ip_address":"0","image_url":"https:\/\/res.cloudinary.com\/pokurivijay\/image\/upload\/v1524738435\/titbits\/a1o7QAR_460swp.jpg","thumbnail_url":"https:\/\/res.cloudinary.com\/pokurivijay\/image\/upload\/v1524738435\/titbits\/a1o7QAR_460swp.webp","age":"34","gender":"1","category":"","likes":"0","status":"1","reactions":"1F602,1F60D,1F62D,1F621,1F631"},{"id":"257","author_id":"1","title":"mika-matin-139247","data_format":"image","card_type":"meme","video_url":"","text":".","slug":"mika-matin-139247","credits":"PC: Unsplash.com","created":"2018-05-06 00:00:00","updated_at":"2017-12-16 17:11:16","solution_reply_id":null,"ip_address":"0","image_url":"https:\/\/res.cloudinary.com\/pokurivijay\/image\/up
@pokurivijay
pokurivijay / PhpFireBaseNotificationSample.php
Created July 4, 2018 15:06 — 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. To use the script, just call http://sample.com/PhpFireBaseNotificationSample.php?id=THE_DEVICE_REGISTRATION_ID The main Code For GCM is https://gist.github.com/prime…
<?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',