Note: Before you spend your time reading on, please know that C2DM is itself deprecated now and replaced by GCM (http://developer.android.com/guide/google/gcm/c2dm.html)
-- Original question --
Do we have example code for implementing PHP server-side code to push messages to Android devices using C2DM?
I have searched for many code samples which are using old authentication method ClientLogin which is deprecated. Reference: https://developers.google.com/accounts/docs/AuthForInstalledApps (Important: ClientLogin has been officially deprecated as of April 20, 2012. It will continue to work as per our deprecation policy, but we encourage you to migrate to OAuth 2.0 as soon as possible.)
That does not apply with C2DM since is a hosted accountif you see the https://developers.google.com/accounts/docs/AuthForInstalledApps it saids
ClientLogin can be used to authorize access to both Google regular and hosted accounts. A hosted account is a user account that is part of the Google Apps service.
Also, if you see the graphic is a clear interaction between User as a UI interface since a CAPTCHA is involved.
Edit
BTW you can see from this post C2DM mechanism still will be using ClientLogin nevertheless the key before October 2011 were going to expired, so you need to recreate them. This is a pretty recent post from 8 days before the ClientLogin was deprecated. C2DM Client Login Key