Class xmlrpc_client
public
|
|
public
|
|
public
|
#
setCredentials( string $u, string $p, integer $t = 1 )
Add some http BASIC AUTH credentials, used by the client to authenticate |
public
|
|
public
|
#
setCaCertificate( string $cacert, boolean $is_dir = false )
Add a CA certificate to verify server with (see man page about CURLOPT_CAINFO for more details |
public
|
|
public
|
|
public
|
#
setSSLVerifyHost( integer $i )
Set attributes for SSL communication: verify match of server cert w. hostname |
public
|
|
public
|
#
setAcceptedCompression( string $compmethod )
Enables/disables reception of compressed xmlrpc responses. Note that enabling reception of compressed responses merely adds some standard http headers to xmlrpc requests. It is up to the xmlrpc server to return compressed responses when receiving such requests. |
public
|
#
setRequestCompression( string $compmethod )
Enables/disables http compression of xmlrpc request. Take care when sending compressed requests: servers might not support them (and automatic fallback to uncompressed requests is not yet implemented) |
public
|
#
setCookie( string $name, string $value = '', string $path = '', string $domain = '', integer $port = null )
Adds a cookie to list of cookies that will be sent to server. NB: setting any param but name and value will turn the cookie into a 'version 1' cookie: do not do it unless you know what you are doing |
public
|
#
SetCurlOptions( mixed $options )
Directly set cURL options, for extra flexibility It allows eg. to bind client to a specific IP interface / address |
public
|
#
SetUserAgent( mixed $agentstring )
Set user-agent string that will be used by this client instance in http headers sent to the server |
public
|
|
public
&
|
#
sendPayloadHTTP10( mixed $msg, mixed $server, mixed $port, mixed $timeout = 0, mixed $username = '', mixed $password = '', mixed $authtype = 1, mixed $proxyhost = '', mixed $proxyport = 0, mixed $proxyusername = '', mixed $proxypassword = '', mixed $proxyauthtype = 1 )
|
public
&
|
#
sendPayloadHTTPS( mixed $msg, mixed $server, mixed $port, mixed $timeout = 0, mixed $username = '', mixed $password = '', mixed $authtype = 1, mixed $cert = '', mixed $certpass = '', mixed $cacert = '', mixed $cacertdir = '', mixed $proxyhost = '', mixed $proxyport = 0, mixed $proxyusername = '', mixed $proxypassword = '', mixed $proxyauthtype = 1, mixed $keepalive = false, mixed $key = '', mixed $keypass = '' )
|
public
&
|
#
sendPayloadCURL( mixed $msg, mixed $server, mixed $port, mixed $timeout = 0, mixed $username = '', mixed $password = '', mixed $authtype = 1, mixed $cert = '', mixed $certpass = '', mixed $cacert = '', mixed $cacertdir = '', mixed $proxyhost = '', mixed $proxyport = 0, mixed $proxyusername = '', mixed $proxypassword = '', mixed $proxyauthtype = 1, mixed $method = 'https', mixed $keepalive = false, mixed $key = '', mixed $keypass = '' )
Contributed by Justin Miller <justin@voxel.net> Requires curl to be built into PHP NB: CURL versions before 7.11.10 cannot use proxy to talk to https servers! |
public
array
|
#
multicall( array $msgs, integer $timeout = 0, string $method = '', boolean $fallback = true )
Send an array of request messages and return an array of responses. Unless $this->no_multicall has been set to true, it will try first to use one single xmlrpc call to server method system.multicall, and revert to sending many successive calls in case of failure. This failure is also stored in $this->no_multicall for subsequent calls. Unfortunately, there is no server error code universally used to denote the fact that multicall is unsupported, so there is no way to reliably distinguish between that and a temporary failure. If you are sure that server supports multicall and do not want to fallback to using many single calls, set the fourth parameter to FALSE. |
public
|
#
_try_multicall( mixed $msgs, mixed $timeout, mixed $method )
Attempt to boxcar $msgs via system.multicall. Returns either an array of xmlrpcreponses, an xmlrpc error response or false (when received response does not respect valid multicall syntax) |
public
mixed
|
$path |
|
|
public
mixed
|
$server |
|
|
public
integer
|
$port | 0 |
|
public
string
|
$method | 'http' |
|
public
mixed
|
$errno |
|
|
public
mixed
|
$errstr |
|
|
public
integer
|
$debug | 0 |
|
public
string
|
$username | '' |
|
public
string
|
$password | '' |
|
public
integer
|
$authtype | 1 |
|
public
string
|
$cert | '' |
|
public
string
|
$certpass | '' |
|
public
string
|
$cacert | '' |
|
public
string
|
$cacertdir | '' |
|
public
string
|
$key | '' |
|
public
string
|
$keypass | '' |
|
public
boolean
|
$verifypeer | true |
|
public
integer
|
$verifyhost | 1 |
|
public
boolean
|
$no_multicall | false |
|
public
string
|
$proxy | '' |
|
public
integer
|
$proxyport | 0 |
|
public
string
|
$proxy_user | '' |
|
public
string
|
$proxy_pass | '' |
|
public
integer
|
$proxy_authtype | 1 |
|
public
array
|
$cookies | array() |
|
public
array
|
$extracurlopts | array() |
|
public
array
|
$accepted_compression | array() |
#
List of http compression methods accepted by the client for responses. NB: PHP supports deflate, gzip compressions out of the box if compiled w. zlib |
public
string
|
$request_compression | '' |
#
Name of compression scheme to be used for sending requests. Either null, gzip or deflate |
public
mixed
|
$xmlrpc_curl_handle | null |
#
CURL handle: used for keep-alive connections (PHP 4.3.8 up, see: http://curl.haxx.se/docs/faq.html#7.3) |
public
boolean
|
$keepalive | false |
|
public
array
|
$accepted_charset_encodings | array() |
|
public
string
|
$request_charset_encoding | '' |
|
public
string
|
$return_type | 'xmlrpcvals' |
#
Decides the content of xmlrpcresp objects returned by calls to send() valid strings are 'xmlrpcvals', 'phpvals' or 'xml' |
public
mixed
|
$user_agent |
|
#
Sent to servers in http headers |