Did anyone create a sendmessage sample in PHP with Google C2DM? A Java send message module isn't really practical because not many hosting providers have Java out of the box.
Erel has provided a great sample but unfortunately most hosting environments are on PHP etc. Practically it would be best to have a PHP module that talks to the phone by using C2DM.
The Java tool is not supposed to be hosted. It is a desktop tool to send messages.
If you need to add a web interface to it, you can call it from a PHP script. There shouldn't be a problem installing Java on your server. You do not need a Java server such as TomCat. You should treat it as a usual executable.
Sorry Erel but this isn't a real life option. Don't want to mess around on my hosted environment with Tomcat etc. PHP is that way to go, will figure something out myself.
Of course a desktop tool is maybe nice but not when running a professional environment where everything is done from a server.
There are some PHP examples on StackOverflow.
Also, if you know Java you can try Google App Engine that has Java support.
Either way, do post some feedback on what you have done.
On a side note, I didnt realise you could use a b4a app as a server and allow devices to communicate with each other using c2dm!
A java server is not needed!
Only the JRE (Java runtime) is needed. You should treat the tool as a regular executable and call it (shell) from your PHP.
Note that you do not need to install Java. You should just put the files in a folder and it works.
The tool is quite complicated. It can be of course ported to PHP but it will not be simple.