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
function send_gcm_notification($registatoin_ids, $title=null, $description=null){ | |
$GOOGLE_API_KEY = 'AIzaZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ'; | |
// Set POST variables | |
$url = 'https://android.googleapis.com/gcm/send'; | |
$post_data = array(); | |
$post_data['to']=$registatoin_ids; | |
$post_data['notification']=array('body'=>'your body', 'title'=>'your title'); | |
$post_data['data']=array('body'=>array('title'=>$title, 'description'=>$description)); |
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 | |
/** | |
* CodeIgniter | |
* | |
* An open source application development framework for PHP 5.2.4 or newer | |
* | |
* NOTICE OF LICENSE | |
* | |
* Licensed under the Open Software License version 3.0 | |
* |