This new post on Richard Heyes' blog today walks through an RPC library that he created for PHP5.
Got bored tonight, so I wrote an RPC library for PHP5. Going to need some RPC at work soon between two web servers, so instead of doing the sensible thing and using an available XMLRPC library or something similar, I naturally wrote my own. Besides, the recent(ish) serious vulnerabilities in the PEAR XMLRPC library make me hesitant to use it.
He includes a basic implementation of the script (to make a call to get the latest UNIX timestamp), with both the code for the client and server sides.