Lines Matching +full:server +full:-
9 * Client for communicating with a XML-RPC Server over HTTPS.
13 * @copyright (c) 2004-2005 Jason Stirk
52 * @param string $server URL of the Server to connect to
55 …public function __construct($server, $path = false, $port = 443, $timeout = false, $timeout_io = n… argument
57 parent::__construct($server, $path, $port, $timeout, $timeout_io);
58 $this->useragent = 'The Incutio XML-RPC PHP Library for SSL';
61 $this->_certFile = false;
62 $this->_caFile = false;
63 $this->_keyFile = false;
64 $this->_passphrase = '';
68 * Set the client side certificates to communicate with the server.
80 $this->_certFile = $certificateFile;
86 $this->_keyFile = $keyFile;
91 $this->_passphrase = (string)$keyPhrase;
97 $this->_caFile = $caFile;
111 $this->timeout = (int)$newTimeOut;
121 return $this->timeout;
125 * Set the query to send to the XML-RPC Server
133 $length = $request->getLength();
134 $xml = $request->getXml();
136 $this->debugOutput('<pre>' . htmlspecialchars($xml) . PHP_EOL . '</pre>');
142 $curl = curl_init('https://' . $this->server . $this->path);
146 //Since 23Jun2004 (0.1.2) - Made timeout a class field
147 curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, $this->timeout);
148 if (null !== $this->timeout_io) {
149 curl_setopt($curl, CURLOPT_TIMEOUT, $this->timeout_io);
152 if ($this->debug) {
159 if($this->port !== 443) {
160 curl_setopt($curl, CURLOPT_PORT, $this->port);
163 "Content-Type: text/xml",
164 "Content-length: {$length}"
168 if (!($this->_certFile === false)) {
170 curl_setopt($curl, CURLOPT_SSLCERT, $this->_certFile);
171 curl_setopt($curl, CURLOPT_SSLKEY, $this->_keyFile);
173 if ($this->debug) {
174 $this->debugOutput('SSL Cert at : ' . $this->_certFile);
175 $this->debugOutput('SSL Key at : ' . $this->_keyFile);
179 if (!($this->_passphrase === '')) {
180 curl_setopt($curl, CURLOPT_SSLCERTPASSWD, $this->_passphrase);
183 if ($this->_caFile === false) {
188 curl_setopt($curl, CURLOPT_CAINFO, $this->_caFile);
198 //There was no "200 OK" returned - we failed
199 return $this->handleError(-32300, 'transport error - HTTP status code was not 200');
202 if ($this->debug) {
203 $this->debugOutput('<pre>' . htmlspecialchars($contents) . PHP_EOL . '</pre>');
206 // Since 20Jun2004 (0.1.1) - We need to remove the headers first
211 $this->message = new Message($contents);
212 if (!$this->message->parse()) {
214 return $this->handleError(-32700, 'parse error. not well formed');
217 if ($this->message->messageType == 'fault') {
218 return $this->handleError($this->message->faultCode, $this->message->faultString);
231 if ($this->debug) {