Skip to content

Instantly share code, notes, and snippets.

@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();