Skip to content

Instantly share code, notes, and snippets.

CREATE TABLE IF NOT EXISTS `android_registered_ids` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`registrationID` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=16 ;
@schmiddim
schmiddim / GoogleCloudMessagingHandler.php
Last active December 18, 2015 08:39
Google Cloud Messaging(GCM) Serverside example
<?php
class GoogleCloudMessagingHandler{
protected $apiKey;
protected $ids=array();
protected $url= 'https://android.googleapis.com/gcm/send';
public function __construct($apiKey){
$this->apiKey = $apiKey;
$this->fetchIds();