Skip to content

Instantly share code, notes, and snippets.

View hungdh0x5e's full-sized avatar
:octocat:
Not Found

Huy Hùng hungdh0x5e

:octocat:
Not Found
View GitHub Profile
@hungdh0x5e
hungdh0x5e / index.php
Created January 15, 2016 08:55
GCM with Android tutorial
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
});
@hungdh0x5e
hungdh0x5e / register.php
Created January 15, 2016 08:49
GCM with Android tutorial
<?php
/**
* Registering a user device
* Store reg id in users table
*/
$body = file_get_contents('php://input');
$postvars = json_decode($body, true);
if (isset($postvars["name"]) && isset($postvars["email"]) && isset($postvars["regId"])) {
@hungdh0x5e
hungdh0x5e / db_functions.php
Created January 14, 2016 17:18
GCM with Android Tutorial
<?php
class DB_Functions {
private $db;
//put your code here
// constructor
function __construct() {
include_once './db_connect.php';