XML_RPC
[ class tree: XML_RPC ] [ index: XML_RPC ] [ all elements ]

Class: XML_RPC_Client

Source Location: /modules/pearxmlrpc/rpc.php

Class Overview

XML_RPC_Base
   |
   --XML_RPC_Client

The methods and properties for submitting XML RPC requests


Author(s):

Version:

  • Release: 1.5.1

Copyright:

  • 1999-2001 Edd Dumbill, 2001-2006 The PHP Group

Variables

Methods


Inherited Methods

Class: XML_RPC_Base

XML_RPC_Base::isError()
Tell whether something is a PEAR_Error object
XML_RPC_Base::raiseError()
PEAR Error handling

Class Details

[line 625]
The methods and properties for submitting XML RPC requests



Tags:

author:  Daniel Convissor <danielc@php.net>
author:  Stig Bakken <stig@php.net>
author:  Edd Dumbill <edd@usefulinc.com>
author:  Martin Jansen <mj@php.net>
version:  Release: 1.5.1
copyright:  1999-2001 Edd Dumbill, 2001-2006 The PHP Group
link:  http://pear.php.net/package/XML_RPC


[ Top ]


Class Variables

$debug =  0

[line 719]

The current debug mode (1 = on, 0 = off)


Type:   integer


[ Top ]

$errno =  0

[line 707]

The error number, if any


Type:   integer


[ Top ]

$errstr =  ''

[line 713]

The error message, if any


Type:   string


[ Top ]

$headers =  ''

[line 725]

The HTTP headers for the current request.


Type:   string


[ Top ]

$password =  ''

[line 667]

A password for accessing the RPC server



Tags:


Type:   string


[ Top ]

$path =  ''

[line 631]

The path and name of the RPC server script you want the request to go to


Type:   string


[ Top ]

$port =  80

[line 653]

The port for connecting to the remote server

The default is 80 for http:// connections and 443 for https:// and ssl:// connections.



Type:   integer


[ Top ]

$protocol =  'http://'

[line 643]

The protocol to use in contacting the remote server


Type:   string


[ Top ]

$proxy =  ''

[line 673]

The name of the proxy server to use, if any


Type:   string


[ Top ]

$proxy_pass =  ''

[line 701]

A password for accessing the proxy server


Type:   string


[ Top ]

$proxy_port =  8080

[line 689]

The port for connecting to the proxy server

The default is 8080 for http:// connections and 443 for https:// and ssl:// connections.



Type:   integer


[ Top ]

$proxy_protocol =  'http://'

[line 679]

The protocol to use in contacting the proxy server, if any


Type:   string


[ Top ]

$proxy_user =  ''

[line 695]

A user name for accessing the proxy server


Type:   string


[ Top ]

$server =  ''

[line 637]

The name of the remote server to connect to


Type:   string


[ Top ]

$username =  ''

[line 660]

A user name for accessing the RPC server



Tags:


Type:   string


[ Top ]



Class Methods


constructor XML_RPC_Client [line 752]

void XML_RPC_Client( string $path, string $server, [integer $port = 0], [string $proxy = ''], [integer $proxy_port = 0], [string $proxy_user = ''], [string $proxy_pass = ''])

Sets the object's properties



Parameters:

string   $path   the path and name of the RPC server script you want the request to go to
string   $server   the URL of the remote server to connect to. If this parameter doesn't specify a protocol and $port is 443, ssl:// is assumed.
integer   $port   a port for connecting to the remote server. Defaults to 80 for http:// connections and 443 for https:// and ssl:// connections.
string   $proxy   the URL of the proxy server to use, if any. If this parameter doesn't specify a protocol and $port is 443, ssl:// is assumed.
integer   $proxy_port   a port for connecting to the remote server. Defaults to 8080 for http:// connections and 443 for https:// and ssl:// connections.
string   $proxy_user   a user name for accessing the proxy server
string   $proxy_pass   a password for accessing the proxy server

[ Top ]

method createHeaders [line 1022]

boolean createHeaders( object $msg)

Determines the HTTP headers and puts it in the $headers property



Tags:

return:  TRUE if okay, FALSE if the message payload isn't set.
access:  protected


Parameters:

object   $msg   the XML_RPC_Message object

[ Top ]

method send [line 881]

object an send( object $msg, [int $timeout = 0])

Transmit the RPC request via HTTP 1.0 protocol



Tags:

return:  XML_RPC_Response object. 0 is returned if any problems happen.
see:  XML_RPC_Message, XML_RPC_Client::XML_RPC_Client(), XML_RPC_Client::setCredentials()


Parameters:

object   $msg   the XML_RPC_Message object
int   $timeout   how many seconds to wait for the request

[ Top ]

method sendPayloadHTTP10 [line 916]

object an sendPayloadHTTP10( object $msg, string $server, int $port, [int $timeout = 0], [string $username = ''], [string $password = ''])

Transmit the RPC request via HTTP 1.0 protocol

Requests should be sent using XML_RPC_Client send() rather than calling this method directly.




Tags:

return:  XML_RPC_Response object. 0 is returned if any problems happen.
see:  XML_RPC_Client::send()
access:  protected


Parameters:

object   $msg   the XML_RPC_Message object
string   $server   the server to send the request to
int   $port   the server port send the request to
int   $timeout   how many seconds to wait for the request before giving up
string   $username   a user name for accessing the RPC server
string   $password   a password for accessing the RPC server

[ Top ]

method setAutoBase64 [line 844]

void setAutoBase64( int $in)

Sets whether strings that contain characters which may cause PHP's SAX-based XML parser to break should be automatically base64 encoded

This is is a workaround for systems that don't have PHP's mbstring extension available.




Parameters:

int   $in   where 1 = on, 0 = off

[ Top ]

method setCredentials [line 863]

void setCredentials( string $u, string $p)

Set username and password properties for connecting to the RPC server



Tags:



Parameters:

string   $u   the user name
string   $p   the password

[ Top ]

method setDebug [line 824]

void setDebug( int $in)

Change the current debug mode



Parameters:

int   $in   where 1 = on, 0 = off

[ Top ]


Documentation generated on Thu, 12 Feb 2009 08:00:07 +0900 by phpDocumentor 1.4.2