XML_RPC_Client Class Reference

Inheritance diagram for XML_RPC_Client:
Collaboration diagram for XML_RPC_Client:

List of all members.


Public Member Functions

 XML_RPC_Client ($path, $server, $port=80)
 send ($msg)
 sendPayload ($msg)

Public Attributes

 $path = ''
 $server = ''
 $port = 80
 $errno = ''
 $errstring = ''
 $timeout = 5
 $no_multicall = false

Detailed Description

Definition at line 352 of file Xmlrpc.php.


Member Function Documentation

XML_RPC_Client::send ( msg  ) 

Definition at line 371 of file Xmlrpc.php.

References sendPayload().

00372         {
00373                 if (is_array($msg))
00374                 {
00375                         // Multi-call disabled
00376                         $r = new XML_RPC_Response(0, $this->xmlrpcerr['multicall_recursion'],$this->xmlrpcstr['multicall_recursion']);
00377                         return $r;
00378                 }
00379 
00380                 return $this->sendPayload($msg);
00381         }

Here is the call graph for this function:

XML_RPC_Client::sendPayload ( msg  ) 

Definition at line 383 of file Xmlrpc.php.

References CI_Xmlrpc::server(), and CI_Xmlrpc::timeout().

Referenced by send().

00384         {       
00385                 $fp = @fsockopen($this->server, $this->port,$this->errno, $this->errstr, $this->timeout);
00386                 
00387                 if ( ! is_resource($fp))
00388                 {
00389                         error_log($this->xmlrpcstr['http_error']);
00390                         $r = new XML_RPC_Response(0, $this->xmlrpcerr['http_error'],$this->xmlrpcstr['http_error']);
00391                         return $r;
00392                 }
00393                 
00394                 if(empty($msg->payload))
00395                 {
00396                         // $msg = XML_RPC_Messages
00397                         $msg->createPayload();
00398                 }
00399                 
00400                 $r = "\r\n";
00401                 $op  = "POST {$this->path} HTTP/1.0$r";
00402                 $op .= "Host: {$this->server}$r";
00403                 $op .= "Content-Type: text/xml$r";
00404                 $op .= "User-Agent: {$this->xmlrpcName}$r";
00405                 $op .= "Content-Length: ".strlen($msg->payload). "$r$r";
00406                 $op .= $msg->payload;
00407                 
00408 
00409                 if ( ! fputs($fp, $op, strlen($op)))
00410                 {
00411                         error_log($this->xmlrpcstr['http_error']);
00412                         $r = new XML_RPC_Response(0, $this->xmlrpcerr['http_error'], $this->xmlrpcstr['http_error']);
00413                         return $r;
00414                 }
00415                 $resp = $msg->parseResponse($fp);
00416                 fclose($fp);
00417                 return $resp;
00418         }

Here is the call graph for this function:

Here is the caller graph for this function:

XML_RPC_Client::XML_RPC_Client ( path,
server,
port = 80 
)

Definition at line 362 of file Xmlrpc.php.

References $path, $port, $server, CI_Xmlrpc::CI_Xmlrpc(), and CI_Xmlrpc::server().

00363         {
00364                 parent::CI_Xmlrpc();
00365                 
00366                 $this->port = $port;
00367                 $this->server = $server;
00368                 $this->path = $path;
00369         }

Here is the call graph for this function:


Member Data Documentation

XML_RPC_Client::$errno = ''

Definition at line 357 of file Xmlrpc.php.

XML_RPC_Client::$errstring = ''

Definition at line 358 of file Xmlrpc.php.

XML_RPC_Client::$no_multicall = false

Definition at line 360 of file Xmlrpc.php.

XML_RPC_Client::$path = ''

Definition at line 354 of file Xmlrpc.php.

Referenced by XML_RPC_Client().

XML_RPC_Client::$port = 80

Definition at line 356 of file Xmlrpc.php.

Referenced by XML_RPC_Client().

XML_RPC_Client::$server = ''

Definition at line 355 of file Xmlrpc.php.

Referenced by XML_RPC_Client().

XML_RPC_Client::$timeout = 5

Definition at line 359 of file Xmlrpc.php.


The documentation for this class was generated from the following file: