Google Cloud Messaging using PHP
I wrote a simple tutorial on how to send a GCM from PHP.
Written by Michael Archbold
Related protips
5 Responses
This is my implementation of GCM for PHP :) http://dexxtr.com/post/46586478992/google-cloud-messaging-gcm-for-php
@dexxtr Very similar, but limits you to one device and only a simple string message? I suppose if thats all you need?
how can i get registration id... please explain that i'm really struggling wit that
@kvn_krishna You get the registration ids from your application running on the device. So you'll need to investigate the client side implementation as well as this server side code.
You'll need to setup some communication between your application and your server to send the registration ids to your server.
Here's a tutorial on using our native extensions to retrieve the registration id though not sure this will be applicable to you: http://distriqt.com/post/1627
You're probably best referring to the android developer documentation: http://developer.android.com/google/gcm/gs.html#android-app
If you want to host PHP application on Google Cloud, then I would recommend using some PaaS where you launch Google Cloud server in one click with PHP stack already installed and configured on it.