PART I: How to implement GCM PhP Push Server for android

In my previous post, GCM replaces C2DM, I was just expressing my happiness of what I think is the best of the new Google Cloud Messaging.

Now this is a small guide for those who would like to add push notifications to their applications:
This part will explain how to prepare your server to send push messages. In another post, preparing the android app will be discussed.

GCM replaces C2DM

Finally! good news from the android team! The old c2dm is deprecated and the new GCM is here:
Same concept but much better features.

I need to say that the best news is that we can finally get push messages as fast as an iphone does. Put simply, we can now send to multiple devices the same push message in one request!!!!