This file contains hidden or 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 | |
| // API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = array( $_GET['id'] ); | |
| // prep the bundle | |
| $msg = array |
This file contains hidden or 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
| Below is a full tutorial on how to setup and use Googles Firebase push notification API for both Android and iOS. It is based on this | |
| earlier implementation of Googles GCM method: https://gist.github.com/prime31/5675017 - FCM is the new method and GCM will eventually be | |
| retired. | |
| ## THE BELOW METHOD IS THE NEWER FCM METHOD: | |
| Register your app in the FCM Console: https://console.firebase.google.com (add project) | |
| 1. Click on the newly added project, in the upper left menu is the "Overview" and Gear Settings. | |
| 2. Click on the GEAR settings icon, and then on "Project Settings" | |
| 3. In the main screen, click on "Cloud Messaging" |
This file contains hidden or 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 | |
| #API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = $_GET['id']; | |
| #prep the bundle | |
| $msg = array | |
| ( | |
| 'body' => 'Body Of Notification', |
This file contains hidden or 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 | |
| session_start(); | |
| if (isset($_GET["locale"])) { | |
| $locale = $_GET["locale"]; | |
| } | |
| else if (isset($_SESSION["locale"])) { | |
| $locale = $_SESSION["locale"]; | |
| } | |
| else { |
This file contains hidden or 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
| /* (320x480) iPhone (Original, 3G, 3GS) */ | |
| @media only screen and (min-device-width: 320px) and (max-device-width: 480px) { | |
| /* insert styles here */ | |
| } | |
| /* (320x480) Smartphone, Portrait */ | |
| @media only screen and (device-width: 320px) and (orientation: portrait) { | |
| /* insert styles here */ | |
| } | |