Please Read The Fine Manual - it should tell you how to code up a server yourself with php
http://us2.php.net/manual/en/ref.sockets.php
there is a simple server client example online, as well as many helpful links on how to run it as a standalone process...
with the magic of Soap, you may want to look into coding up your server as a WebService.. that might be neat
see if any of that makes sense, and post back with any specific quesitons you want to know about