Lines Matching +full:server +full:-

17     protected $server;  variable in IXR\\Client\\Client
38 … public function __construct($server, $path = false, $port = 80, $timeout = 15, $timeout_io = null) argument
42 $bits = parse_url($server);
43 $this->server = $bits['host'];
44 $this->port = isset($bits['port']) ? $bits['port'] : 80;
45 $this->path = isset($bits['path']) ? $bits['path'] : '/';
48 if (!$this->path) {
49 $this->path = '/';
53 $this->path .= '?' . $bits['query'];
56 $this->server = $server;
57 $this->path = $path;
58 $this->port = $port;
60 $this->useragent = 'The Incutio XML-RPC PHP Library';
61 $this->timeout = $timeout;
62 $this->timeout_io = $timeout_io;
70 $length = $request->getLength();
71 $xml = $request->getXml();
73 $request = "POST {$this->path} HTTP/1.0$r";
75 // Merged from WP #8145 - allow custom headers
76 $this->headers['Host'] = $this->server;
77 $this->headers['Content-Type'] = 'text/xml';
78 $this->headers['User-Agent'] = $this->useragent;
79 $this->headers['Content-Length'] = $length;
81 foreach ($this->headers as $header => $value) {
89 if ($this->debug) {
93 if ($this->timeout) {
95 $fp = fsockopen($this->server, $this->port, $errno, $errstr, $this->timeout);
101 $fp = fsockopen($this->server, $this->port, $errno, $errstr);
107 return $this->handleError(-32300, 'transport error - could not open socket');
109 if (null !== $this->timeout_io) {
110 stream_set_timeout($fp, $this->timeout_io);
122 … return $this->handleError(-32300, 'transport error - HTTP status code was not 200');
130 // merged from WP #12559 - remove trim
133 if ($this->debug) {
137 if ($this->debug) {
142 $this->message = new Message($contents);
143 if (!$this->message->parse()) {
145 return $this->handleError(-32700, 'Parse error. Message not well formed');
149 if ($this->message->messageType == 'fault') {
150 return $this->handleError($this->message->faultCode, $this->message->faultString);
159 // methodResponses can only have one param - return that
160 return $this->message->params[0];
165 return (is_object($this->error));
170 $this->error = new Error($errorCode, $errorMessage);
177 return $this->error;
182 return $this->error->code;
187 return $this->error->message;
197 return $this->timeout_io;
206 $this->timeout_io = $timeout_io;