Last active
August 29, 2015 13:56
-
-
Save praserocking/8894746 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$gcm= new GCMUtility('<your api key>'); | |
$gcm->set_time_to_live(<seconds>); //*** optional parameter : int | |
$gcm->set_restricted_package_name(<restricted package name>); //*** optional parameter: string | |
$gcm->set_device_ids(<device IDs given by GCM>); // mandatory parameter: either array of strings or a string | |
$gcm->set_message(<message to be sent>); // mandatory parameter: either a string or array of string with string keys ;example: array("number":"345"); | |
if($gcm->send())echo "Message Sent"; | |
else echo "Message Sending not Successful"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment