The O'Reilly Web Services has a new article that highlights one of the more underused features of PHP - its ability to create or "consume" web services very easily with XML-RPC, NuSOAP, and REST libraries.
They start off stepping you through an example of XML-RPC (using these XML-RPC libraries) to create both sides - the server recieving the XML as well as the client sending the correctly-formatted XML. For a simple and lightweight XML-based protocol, XML-RPC is a much easier and cleaner way to go than a SOAP solution. Moving on, they cover just that - helping you create both sides of a SOAP connection with the aid of the NuSOAP libraries.
The third example is a rarely used communication protocol - REST ("Representational State Transfer"). REST differs a great deal from SOAP and XML-RPC. First, it's not a standard, whether formal or informal. Second, there is no standardized toolkit or pre-built client and server classes in PHP. The strength of REST is that you won't need special extensions or tools to develop web services. The HTTP protocol specifications contains everything you would need to transmit and receive XML messages.
Since REST uses a simple HTTP connection (much like a GET string), it may not be the best option for your scripts, but it does get the job done...




