Skip to content

Instantly share code, notes, and snippets.

View roydondsouza's full-sized avatar

Roydon DSouza roydondsouza

View GitHub Profile
@roydondsouza
roydondsouza / gist:6dc666f88e459a40bc4bf04b1ab8d51f
Created June 16, 2016 18:52 — 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