Skip to content

Instantly share code, notes, and snippets.

@ayushhgoyal
ayushhgoyal / test_gcm.php
Last active October 1, 2015 15:46 — forked from phpfiddle/fiddle_090817.php
[ Posted by Ayush ] This is php code to test android push notifications (GCM) online. Just replace API key and device ids. It will send a notification with key "alert". It can be executed here: http://phpfiddle.org/main/code/c12cf0475e97f3cf19c1 (Shortcut: F9)
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'AIzaSyDD5cwKE6O252bVA766Lyo2cQhG7RbShWA' );
$registrationIds = array("erKXJiDIdiY:APA91bE3N0Bfh6e7tpIT2qcHBD_vqg6ObMQHyrbXEAf6MQqeHcGSauArLzoQRvWb7VpHY_hReEdfw3WxU5Ybk95dWnGT2KAQmC9cHAajuDQx5kJu1Ic2QJKuu3vYNtuRAo6edfuMrbJj" );
// prep the bundle