PHP
  Home arrow PHP arrow Page 4 - Using XML-RPC with PHP
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Moblin 
JMSL Numerical Library 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Using XML-RPC with PHP
By: Lucas Marshall
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 27
    2001-12-20

    Table of Contents:
  • Using XML-RPC with PHP
  • Compiling PHP with XML-RPC Support
  • Dissection of a XML-RPC Call
  • Dissection of a XML-RPC Response
  • Creating an XML-RPC Server
  • Creating an XML-RPC Client
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using XML-RPC with PHP - Dissection of a XML-RPC Response


    (Page 4 of 7 )

    And here's the response to the call:

    HTTP/1.1 200 OK Connection: close Content-Length: 191 Content-Type: text/xml Date: Tue, 18 Dec 2001 14:23:52 GMT Server: xmlrpc-epi-php/0.2 (PHP) <?xml version='1.0' encoding="iso-8859-1" ?> <methodResponse> <params> <param> <value> <string>Hello Lucas. How are you today?</string> </value> </param> </params> </methodResponse>
    With your newly found knowledge of XML-RPC calls, it is easy to decipher standard responses. Normal responses consist of <params> container with <param> elements (and all they are heir to) sent inside <methodResponse> tags, but there is another type of response - a fault:

    HTTP/1.1 200 OK Connection: close Content-Length: 356 Content-Type: text/xml Date: Tue, 18 Dec 2001 13:52:25 GMT Server: Apache/1.3.20 <?xml version='1.0' encoding="iso-8859-1" ?> <methodResponse> <fault> <value> <struct> <member> <name>faultCode</name> <value> <int>4</int> </value> </member> <member> <name>faultString</name> <value> <string>Too many parameters.</string> </value> </member> </struct> </value> </fault> </methodResponse>
    As you can see, a fault response consists of a <methodResponse> containing a <fault> which contains a <value> which is a <struct> containing two elements, one named <faultCode>, an <int> and one named <faultString>, a <string>.

    Please note that a response cannot contain both a <params> container and a <fault> container.

    More PHP Articles
    More By Lucas Marshall


     

       

    PHP ARTICLES

    - Validating Web Forms with the Code Igniter P...
    - Output Buffering
    - Paginating Database Records with the Code Ig...
    - HTTP Headers in Web Development
    - Project Management: Administration
    - Building a Database-Driven Application with ...
    - User Authentication for a Project Management...
    - Introduction to the CodeIgniter PHP Framework
    - Adding Users for a Project Management Applic...
    - Migrating Class Code for a MIME Email to PHP...
    - Login and Logout Authentication for a Projec...
    - Composing Messages in HTML for MIME Email wi...
    - Project Management: Authentication
    - A Better Way to Determine MIME Types for MIM...
    - Project Management Overview





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway