In this tutorial I have used PHP as server side programming language and MySQL database to store data. Since sending message from PHP to GCM is easy, here we'll be using CURL to create a message request to send for Google GCM server. CURL is a library that lets you make HTTP requests in PHP.
Open the http://hostname/GcmService.php in browser, you can see the gcmService as showed below.
Push Notification provides a channel to push notifications to clients, and the notification payload can contain some limited set of parameter-value pairs that can be parsed by the ADF Mobile app, when you click on the notification message. In this example I am sending the payload as
"$message = array("alert" => $message, 'sound' => 'default', 'customMessage' => $customMessage);"
You can alter the payload in send_message.php. Once the users registered with GCM, http://hostname/index.php screen will looks as below.
Now you can send the Push Notification message to registered users.