Skip to content

Instantly share code, notes, and snippets.

@hungdh9x
Last active March 16, 2016 09:44
Show Gist options
  • Save hungdh9x/76ff3d300b1007d92de0 to your computer and use it in GitHub Desktop.
Save hungdh9x/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