Skip to content

Instantly share code, notes, and snippets.

@hungdh0x5e
Last active March 16, 2016 09:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hungdh0x5e/76ff3d300b1007d92de0 to your computer and use it in GitHub Desktop.
Save hungdh0x5e/76ff3d300b1007d92de0 to your computer and use it in GitHub Desktop.
GCM with Android tutorial
<?php
if (isset($_GET["regId"]) && isset($_GET["message"])) {
$regId = $_GET["regId"];
$message = $_GET["message"];
include_once './GCM.php';
$gcm = new GCM();
$registatoin_ids = array($regId);
$message = array("message" => $message);
$result = $gcm->send_notification($registatoin_ids, $message);
echo $result;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment