XML-RPC for PHP

version 2.0

Edd Dumbill

Gaetano Giunta

Miles Lott

Justin R. Miller

Andres Salomon

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  • Neither the name of the "XML-RPC for PHP" nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Table of Contents

1. Introduction
1. Acknowledgements
2. What's new
1. 2.0 Release candidate 1
2. 2.0 Release candidate 2
3. 2.0 Release candidate 3
4. 2.0 final
3. System Requirements
4. Files in the distribution
5. Known bugs and limitations
6. Support
1. Online Support
2. The Jellyfish Book
7. Class documentation
1. xmlrpcval
1.1. Notes on types
1.1.1. int
1.1.2. base64
1.1.3. boolean
1.1.4. string
1.2. Creation
1.3. Methods
1.3.1. addScalar
1.3.2. addArray
1.3.3. addStruct
1.3.4. kindOf
1.3.5. serialize
1.3.6. scalarval
1.3.7. scalartyp
1.3.8. arraymem
1.3.9. arraysize
1.3.10. structmem
1.3.11. structeach
1.3.12. structreset
1.3.13. structmemexists
2. xmlrpcmsg
2.1. Creation
2.2. Methods
2.2.1. addParam
2.2.2. getNumParams
2.2.3. getParam
2.2.4. method
2.2.5. parseResponse
2.2.6. parseResponseFile
2.2.7. serialize
3. xmlrpc_client
3.1. Creation
3.2. Methods
3.2.1. send
3.2.2. multicall
3.2.3. setAcceptedCompression
3.2.4. SetCaCertificate
3.2.5. setCertificate
3.2.6. setCookie
3.2.7. setCredentials
3.2.8. setDebug
3.2.9. setKey
3.2.10. setProxy
3.2.11. setRequestCompression
3.2.12. setSSLVerifyHost
3.2.13. setSSLVerifyPeer
3.3. Variables
3.3.1. no_multicall
3.3.2. request_charset_encoding
3.3.3. return_type
4. xmlrpcresp
4.1. Creation
4.2. Methods
4.2.1. faultCode
4.2.2. faultString
4.2.3. value
4.2.4. serialize
5. xmlrpc_server
5.1. Method handler functions
5.2. The dispatch map
5.3. Method signatures
5.4. Delaying the server response
5.5. Modifying the server behaviour
5.5.1. setDebug()
5.5.2. allow_system_funcs
5.5.3. compress_response
5.5.4. response_charset_encoding
5.6. Fault reporting
5.7. 'New style' servers
8. Global variables
1. "Constant" variables
1.1. $xmlrpcerruser
1.2. $xmlrpcI4, $xmlrpcInt, $xmlrpcDouble, $xmlrpcString, $xmlrpcDateTime, $xmlrpcBase64 , $xmlrpcArray, $xmlrpcStruct, $xmlrpcValue
1.3. $xmlrpcTypes, $xmlEntities, $xmlrpcerr, $xmlrpcstr, $xmlrpcerrxml, $xmlrpc_backslash, $_xh, $xml_iso88591_Entities
2. Variables whose value can be modified
2.1. xmlrpc_defencoding
2.2. xmlrpc_internalencoding
2.3. xmlrpcName
2.4. xmlrpcVersion
9. Helper functions
1. Date functions
1.1. iso8601_encode
1.2. iso8601_decode
2. Easy use with nested PHP values
2.1. php_xmlrpc_decode
2.2. php_xmlrpc_encode
3. Automatic conversion of php functions into xmlrpc methods (and vice versa)
3.1. wrap_xmlrpc_method
3.2. wrap_php_function
4. Functions removed from the library
4.1. xmlrpc_decode
4.2. xmlrpc_encode
5. Debugging aids
5.1. xmlrpc_debugmsg
10. Reserved methods
1. system.listMethods
2. system.methodSignature
3. system.methodHelp
4. system.Multicall
11. Examples
1. XML-RPC client: state name query
2. Executing a multicall call
12. Frequently Asked Questions
1. How to send XML as payload of a method call
2. Is there any limitation on the size of the requests / responses that can be successfully sent?
3. My server (client) returns an error whenever the client (server) returns accented characters
4. My php error log is getting full of "deprecated" errors on different lines of xmlrpc.inc and xmlrpcs.inc
A. Integration with the PHP xmlrpc extension
B. 'Enough of xmlrpcvals!': new style library usage