43 require_once
'XML/RPC2/Exception.php';
44 require_once
'XML/RPC2/Backend.php';
138 public abstract function remoteCall___($methodName, $parameters);
155 if (!$uriParse = parse_url(
$uri)) {
159 if (isset($options[
'prefix'])) {
163 $this->prefix = $options[
'prefix'];
165 if (isset($options[
'proxy'])) {
166 if (!$proxyParse = parse_url($options[
'proxy'])) {
167 throw new XML_RPC2_InvalidProxyException(sprintf(
'Proxy URI \'%s\' is not valid', $options[
'proxy']));
169 $this->proxy = $options[
'proxy'];
171 if (isset($options[
'debug'])) {
172 if (!(is_bool($options[
'debug']))) {
175 $this->debug = $options[
'debug'];
177 if (isset($options[
'encoding'])) {
179 $this->encoding = $options[
'encoding'];
181 if (isset($options[
'uglyStructHack'])) {
182 $this->uglyStructHack = $options[
'uglyStructHack'];
184 if (isset($options[
'sslverify'])) {
185 if (!(is_bool($options[
'sslverify']))) {
188 $this->sslverify = $options[
'sslverify'];
207 if (isset($options[
'backend'])) {
211 return new $backend(
$uri, $options);
230 public function __call($methodName, $parameters)
232 $args = array($methodName, $parameters);
233 return @call_user_func_array(array($this,
'remoteCall___'), $args);
251 print
"***** Request *****\n";
252 print htmlspecialchars($request);
253 print
"***** End Of request *****\n\n";
254 print
"***** Server response *****\n";
255 print htmlspecialchars($body);
256 print
"\n***** End of server response *****\n\n";
272 print
"***** Decoded result *****\n";
274 print
"\n***** End of decoded result *****";
292 return (preg_match(
'~^[a-zA-Z0-9_.:/]*$~', $methodName));