Welcome 2015
[plcapi.git] / debugger / action.php
1 <?php
2 /**
3  * @author Gaetano Giunta
4  * @copyright (C) 2005-2015 G. Giunta
5  * @license code licensed under the BSD License: http://phpxmlrpc.sourceforge.net/license.txt
6  *
7  * @todo switch params for http compression from 0,1,2 to values to be used directly
8  * @todo use ob_start to catch debug info and echo it AFTER method call results?
9  * @todo be smarter in creating client stub for proxy/auth cases: only set appropriate property of client obj
10  **/
11 ?>
12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
13     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
14 <html xmlns="http://www.w3.org/1999/xhtml">
15 <head>
16     <title>XMLRPC Debugger</title>
17     <meta name="robots" content="index,nofollow"/>
18     <style type="text/css">
19         <!--
20         body {
21             border-top: 1px solid gray;
22             padding: 1em;
23             font-family: Verdana, Arial, Helvetica;
24             font-size: 8pt;
25         }
26
27         h3 {
28             font-size: 9.5pt;
29         }
30
31         h2 {
32             font-size: 12pt;
33         }
34
35         .dbginfo {
36             padding: 1em;
37             background-color: #EEEEEE;
38             border: 1px dashed silver;
39             font-family: monospace;
40         }
41
42         #response {
43             padding: 1em;
44             margin-top: 1em;
45             background-color: #DDDDDD;
46             border: 1px solid gray;
47             white-space: pre;
48             font-family: monospace;
49         }
50
51         table {
52             padding: 2px;
53             margin-top: 1em;
54         }
55
56         th {
57             background-color: navy;
58             color: white;
59             padding: 0.5em;
60         }
61
62         td {
63             padding: 0.5em;
64             font-family: monospace;
65         }
66
67         td form {
68             margin: 0;
69         }
70
71         .oddrow {
72             background-color: #EEEEEE;
73         }
74
75         .evidence {
76             color: blue;
77         }
78
79         #phpcode {
80             background-color: #EEEEEE;
81             padding: 1em;
82             margin-top: 1em;
83         }
84
85         -->
86     </style>
87 </head>
88 <body>
89 <?php
90
91 include __DIR__ . '/common.php';
92 if ($action) {
93
94     // make sure the script waits long enough for the call to complete...
95     if ($timeout) {
96         set_time_limit($timeout + 10);
97     }
98
99     include 'xmlrpc.inc';
100     if ($wstype == 1) {
101         @include 'jsonrpc.inc';
102         if (!class_exists('jsonrpc_client')) {
103             die('Error: to debug the jsonrpc protocol the jsonrpc.inc file is needed');
104         }
105         $clientclass = 'jsonrpc_client';
106         $msgclass = 'jsonrpcmsg';
107         $protoname = 'JSONRPC';
108     } else {
109         $clientclass = 'xmlrpc_client';
110         $msgclass = 'xmlrpcmsg';
111         $protoname = 'XMLRPC';
112     }
113
114     if ($port != "") {
115         $client = new $clientclass($path, $host, $port);
116         $server = "$host:$port$path";
117     } else {
118         $client = new $clientclass($path, $host);
119         $server = "$host$path";
120     }
121     if ($protocol == 2) {
122         $server = 'https://' . $server;
123     } else {
124         $server = 'http://' . $server;
125     }
126     if ($proxy != '') {
127         $pproxy = explode(':', $proxy);
128         if (count($pproxy) > 1) {
129             $pport = $pproxy[1];
130         } else {
131             $pport = 8080;
132         }
133         $client->setProxy($pproxy[0], $pport, $proxyuser, $proxypwd);
134     }
135
136     if ($protocol == 2) {
137         $client->setSSLVerifyPeer($verifypeer);
138         $client->setSSLVerifyHost($verifyhost);
139         if ($cainfo) {
140             $client->setCaCertificate($cainfo);
141         }
142         $httpprotocol = 'https';
143     } elseif ($protocol == 1) {
144         $httpprotocol = 'http11';
145     } else {
146         $httpprotocol = 'http';
147     }
148
149     if ($username) {
150         $client->setCredentials($username, $password, $authtype);
151     }
152
153     $client->setDebug($debug);
154
155     switch ($requestcompression) {
156         case 0:
157             $client->request_compression = '';
158             break;
159         case 1:
160             $client->request_compression = 'gzip';
161             break;
162         case 2:
163             $client->request_compression = 'deflate';
164             break;
165     }
166
167     switch ($responsecompression) {
168         case 0:
169             $client->accepted_compression = '';
170             break;
171         case 1:
172             $client->accepted_compression = array('gzip');
173             break;
174         case 2:
175             $client->accepted_compression = array('deflate');
176             break;
177         case 3:
178             $client->accepted_compression = array('gzip', 'deflate');
179             break;
180     }
181
182     $cookies = explode(',', $clientcookies);
183     foreach ($cookies as $cookie) {
184         if (strpos($cookie, '=')) {
185             $cookie = explode('=', $cookie);
186             $client->setCookie(trim($cookie[0]), trim(@$cookie[1]));
187         }
188     }
189
190     $msg = array();
191     switch ($action) {
192
193         case 'wrap':
194             @include 'xmlrpc_wrappers.inc';
195             if (!function_exists('build_remote_method_wrapper_code')) {
196                 die('Error: to enable creation of method stubs the xmlrpc_wrappers.inc file is needed');
197             }
198         // fall thru intentionally
199         case 'describe':
200         case 'wrap':
201             $msg[0] = new $msgclass('system.methodHelp', array(), $id);
202             $msg[0]->addparam(new xmlrpcval($method));
203             $msg[1] = new $msgclass('system.methodSignature', array(), $id + 1);
204             $msg[1]->addparam(new xmlrpcval($method));
205             $actionname = 'Description of method "' . $method . '"';
206             break;
207         case 'list':
208             $msg[0] = new $msgclass('system.listMethods', array(), $id);
209             $actionname = 'List of available methods';
210             break;
211         case 'execute':
212             if (!payload_is_safe($payload)) {
213                 die("Tsk tsk tsk, please stop it or I will have to call in the cops!");
214             }
215             $msg[0] = new $msgclass($method, array(), $id);
216             // hack! build xml payload by hand
217             if ($wstype == 1) {
218                 $msg[0]->payload = "{\n" .
219                     '"method": "' . $method . "\",\n\"params\": [" .
220                     $payload .
221                     "\n],\n\"id\": ";
222                 // fix: if user gave an empty string, use NULL, or we'll break json syntax
223                 if ($id == "") {
224                     $msg[0]->payload .= "null\n}";
225                 } else {
226                     if (is_numeric($id) || $id == 'false' || $id == 'true' || $id == 'null') {
227                         $msg[0]->payload .= "$id\n}";
228                     } else {
229                         $msg[0]->payload .= "\"$id\"\n}";
230                     }
231                 }
232             } else {
233                 $msg[0]->payload = $msg[0]->xml_header() .
234                     '<methodName>' . $method . "</methodName>\n<params>" .
235                     $payload .
236                     "</params>\n" . $msg[0]->xml_footer();
237             }
238             $actionname = 'Execution of method ' . $method;
239             break;
240         default: // give a warning
241             $actionname = '[ERROR: unknown action] "' . $action . '"';
242     }
243
244     // Before calling execute, echo out brief description of action taken + date and time ???
245     // this gives good user feedback for long-running methods...
246     echo '<h2>' . htmlspecialchars($actionname) . ' on server ' . htmlspecialchars($server) . " ...</h2>\n";
247     flush();
248
249     $response = null;
250     // execute method(s)
251     if ($debug) {
252         echo '<div class="dbginfo"><h2>Debug info:</h2>';
253     }  /// @todo use ob_start instead
254     $resp = array();
255     $mtime = explode(' ', microtime());
256     $time = (float)$mtime[0] + (float)$mtime[1];
257     foreach ($msg as $message) {
258         // catch errors: for older xmlrpc libs, send does not return by ref
259         @$response = &$client->send($message, $timeout, $httpprotocol);
260         $resp[] = $response;
261         if (!$response || $response->faultCode()) {
262             break;
263         }
264     }
265     $mtime = explode(' ', microtime());
266     $time = (float)$mtime[0] + (float)$mtime[1] - $time;
267     if ($debug) {
268         echo "</div>\n";
269     }
270
271     if ($response) {
272         if ($response->faultCode()) {
273             // call failed! echo out error msg!
274             //echo '<h2>'.htmlspecialchars($actionname).' on server '.htmlspecialchars($server).'</h2>';
275             echo "<h3>$protoname call FAILED!</h3>\n";
276             echo "<p>Fault code: [" . htmlspecialchars($response->faultCode()) .
277                 "] Reason: '" . htmlspecialchars($response->faultString()) . "'</p>\n";
278             echo(strftime("%d/%b/%Y:%H:%M:%S\n"));
279         } else {
280             // call succeeded: parse results
281             //echo '<h2>'.htmlspecialchars($actionname).' on server '.htmlspecialchars($server).'</h2>';
282             printf("<h3>%s call(s) OK (%.2f secs.)</h3>\n", $protoname, $time);
283             echo(strftime("%d/%b/%Y:%H:%M:%S\n"));
284
285             switch ($action) {
286                 case 'list':
287
288                     $v = $response->value();
289                     if ($v->kindOf() == "array") {
290                         $max = $v->arraysize();
291                         echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
292                         echo "<thead>\n<tr><th>Method</th><th>Description</th></tr>\n</thead>\n<tbody>\n";
293                         for ($i = 0; $i < $max; $i++) {
294                             $rec = $v->arraymem($i);
295                             if ($i % 2) {
296                                 $class = ' class="oddrow"';
297                             } else {
298                                 $class = ' class="evenrow"';
299                             }
300                             echo("<tr><td$class>" . htmlspecialchars($rec->scalarval()) . "</td><td$class><form action=\"controller.php\" method=\"get\" target=\"frmcontroller\">" .
301                                 "<input type=\"hidden\" name=\"host\" value=\"" . htmlspecialchars($host) . "\" />" .
302                                 "<input type=\"hidden\" name=\"port\" value=\"" . htmlspecialchars($port) . "\" />" .
303                                 "<input type=\"hidden\" name=\"path\" value=\"" . htmlspecialchars($path) . "\" />" .
304                                 "<input type=\"hidden\" name=\"id\" value=\"" . htmlspecialchars($id) . "\" />" .
305                                 "<input type=\"hidden\" name=\"debug\" value=\"$debug\" />" .
306                                 "<input type=\"hidden\" name=\"username\" value=\"" . htmlspecialchars($username) . "\" />" .
307                                 "<input type=\"hidden\" name=\"password\" value=\"" . htmlspecialchars($password) . "\" />" .
308                                 "<input type=\"hidden\" name=\"authtype\" value=\"$authtype\" />" .
309                                 "<input type=\"hidden\" name=\"verifyhost\" value=\"$verifyhost\" />" .
310                                 "<input type=\"hidden\" name=\"verifypeer\" value=\"$verifypeer\" />" .
311                                 "<input type=\"hidden\" name=\"cainfo\" value=\"" . htmlspecialchars($cainfo) . "\" />" .
312                                 "<input type=\"hidden\" name=\"proxy\" value=\"" . htmlspecialchars($proxy) . "\" />" .
313                                 "<input type=\"hidden\" name=\"proxyuser\" value=\"" . htmlspecialchars($proxyuser) . "\" />" .
314                                 "<input type=\"hidden\" name=\"proxypwd\" value=\"" . htmlspecialchars($proxypwd) . "\" />" .
315                                 "<input type=\"hidden\" name=\"responsecompression\" value=\"$responsecompression\" />" .
316                                 "<input type=\"hidden\" name=\"requestcompression\" value=\"$requestcompression\" />" .
317                                 "<input type=\"hidden\" name=\"clientcookies\" value=\"" . htmlspecialchars($clientcookies) . "\" />" .
318                                 "<input type=\"hidden\" name=\"protocol\" value=\"$protocol\" />" .
319                                 "<input type=\"hidden\" name=\"timeout\" value=\"" . htmlspecialchars($timeout) . "\" />" .
320                                 "<input type=\"hidden\" name=\"method\" value=\"" . $rec->scalarval() . "\" />" .
321                                 "<input type=\"hidden\" name=\"wstype\" value=\"$wstype\" />" .
322                                 "<input type=\"hidden\" name=\"action\" value=\"describe\" />" .
323                                 "<input type=\"hidden\" name=\"run\" value=\"now\" />" .
324                                 "<input type=\"submit\" value=\"Describe\" /></form></td>");
325                             //echo("</tr>\n");
326
327                             // generate lo scheletro per il method payload per eventuali test
328                             //$methodpayload="<methodCall>\n<methodName>".$rec->scalarval()."</methodName>\n<params>\n<param><value></value></param>\n</params>\n</methodCall>";
329
330                             /*echo ("<form action=\"{$_SERVER['PHP_SELF']}\" method=\"get\"><td>".
331                               "<input type=\"hidden\" name=\"host\" value=\"$host\" />".
332                               "<input type=\"hidden\" name=\"port\" value=\"$port\" />".
333                               "<input type=\"hidden\" name=\"path\" value=\"$path\" />".
334                               "<input type=\"hidden\" name=\"method\" value=\"".$rec->scalarval()."\" />".
335                               "<input type=\"hidden\" name=\"methodpayload\" value=\"$payload\" />".
336                               "<input type=\"hidden\" name=\"action\" value=\"execute\" />".
337                               "<input type=\"submit\" value=\"Test\" /></td></form>");*/
338                             echo("</tr>\n");
339                         }
340                         echo "</tbody>\n</table>";
341                     }
342                     break;
343
344                 case 'describe':
345
346                     $r1 = $resp[0]->value();
347                     $r2 = $resp[1]->value();
348
349                     echo "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n";
350                     echo "<thead>\n<tr><th>Method</th><th>" . htmlspecialchars($method) . "</th><th>&nbsp;</th><th>&nbsp;</th></tr>\n</thead>\n<tbody>\n";
351                     $desc = htmlspecialchars($r1->scalarval());
352                     if ($desc == "") {
353                         $desc = "-";
354                     }
355                     echo "<tr><td class=\"evenrow\">Description</td><td colspan=\"3\" class=\"evenrow\">$desc</td></tr>\n";
356                     $payload = "";
357                     $alt_payload = "";
358                     if ($r2->kindOf() != "array") {
359                         echo "<tr><td class=\"oddrow\">Signature</td><td class=\"oddrow\">Unknown</td><td class=\"oddrow\">&nbsp;</td></tr>\n";
360                     } else {
361                         for ($i = 0; $i < $r2->arraysize(); $i++) {
362                             if ($i + 1 % 2) {
363                                 $class = ' class="oddrow"';
364                             } else {
365                                 $class = ' class="evenrow"';
366                             }
367                             echo "<tr><td$class>Signature&nbsp;" . ($i + 1) . "</td><td$class>";
368                             $x = $r2->arraymem($i);
369                             if ($x->kindOf() == "array") {
370                                 $ret = $x->arraymem(0);
371                                 echo "<code>OUT:&nbsp;" . htmlspecialchars($ret->scalarval()) . "<br />IN: (";
372                                 if ($x->arraysize() > 1) {
373                                     for ($k = 1; $k < $x->arraysize(); $k++) {
374                                         $y = $x->arraymem($k);
375                                         echo $y->scalarval();
376                                         if ($wstype != 1) {
377                                             $payload = $payload . '<param><value><' . htmlspecialchars($y->scalarval()) . '></' . htmlspecialchars($y->scalarval()) . "></value></param>\n";
378                                         }
379                                         $alt_payload .= $y->scalarval();
380                                         if ($k < $x->arraysize() - 1) {
381                                             $alt_payload .= ';';
382                                             echo ", ";
383                                         }
384                                     }
385                                 }
386                                 echo ")</code>";
387                             } else {
388                                 echo 'Unknown';
389                             }
390                             echo '</td>';
391                             //bottone per testare questo metodo
392                             //$payload="<methodCall>\n<methodName>$method</methodName>\n<params>\n$payload</params>\n</methodCall>";
393                             echo "<td$class><form action=\"controller.php\" target=\"frmcontroller\" method=\"get\">" .
394                                 "<input type=\"hidden\" name=\"host\" value=\"" . htmlspecialchars($host) . "\" />" .
395                                 "<input type=\"hidden\" name=\"port\" value=\"" . htmlspecialchars($port) . "\" />" .
396                                 "<input type=\"hidden\" name=\"path\" value=\"" . htmlspecialchars($path) . "\" />" .
397                                 "<input type=\"hidden\" name=\"id\" value=\"" . htmlspecialchars($id) . "\" />" .
398                                 "<input type=\"hidden\" name=\"debug\" value=\"$debug\" />" .
399                                 "<input type=\"hidden\" name=\"username\" value=\"" . htmlspecialchars($username) . "\" />" .
400                                 "<input type=\"hidden\" name=\"password\" value=\"" . htmlspecialchars($password) . "\" />" .
401                                 "<input type=\"hidden\" name=\"authtype\" value=\"$authtype\" />" .
402                                 "<input type=\"hidden\" name=\"verifyhost\" value=\"$verifyhost\" />" .
403                                 "<input type=\"hidden\" name=\"verifypeer\" value=\"$verifypeer\" />" .
404                                 "<input type=\"hidden\" name=\"cainfo\" value=\"" . htmlspecialchars($cainfo) . "\" />" .
405                                 "<input type=\"hidden\" name=\"proxy\" value=\"" . htmlspecialchars($proxy) . "\" />" .
406                                 "<input type=\"hidden\" name=\"proxyuser\" value=\"" . htmlspecialchars($proxyuser) . "\" />" .
407                                 "<input type=\"hidden\" name=\"proxypwd\" value=\"" . htmlspecialchars($proxypwd) . "\" />" .
408                                 "<input type=\"hidden\" name=\"responsecompression\" value=\"$responsecompression\" />" .
409                                 "<input type=\"hidden\" name=\"requestcompression\" value=\"$requestcompression\" />" .
410                                 "<input type=\"hidden\" name=\"clientcookies\" value=\"" . htmlspecialchars($clientcookies) . "\" />" .
411                                 "<input type=\"hidden\" name=\"protocol\" value=\"$protocol\" />" .
412                                 "<input type=\"hidden\" name=\"timeout\" value=\"" . htmlspecialchars($timeout) . "\" />" .
413                                 "<input type=\"hidden\" name=\"method\" value=\"" . htmlspecialchars($method) . "\" />" .
414                                 "<input type=\"hidden\" name=\"methodpayload\" value=\"" . htmlspecialchars($payload) . "\" />" .
415                                 "<input type=\"hidden\" name=\"altmethodpayload\" value=\"" . htmlspecialchars($alt_payload) . "\" />" .
416                                 "<input type=\"hidden\" name=\"wstype\" value=\"$wstype\" />" .
417                                 "<input type=\"hidden\" name=\"action\" value=\"execute\" />";
418                             if ($wstype != 1) {
419                                 echo "<input type=\"submit\" value=\"Load method synopsis\" />";
420                             }
421                             echo "</form></td>\n";
422
423                             echo "<td$class><form action=\"controller.php\" target=\"frmcontroller\" method=\"get\">" .
424                                 "<input type=\"hidden\" name=\"host\" value=\"" . htmlspecialchars($host) . "\" />" .
425                                 "<input type=\"hidden\" name=\"port\" value=\"" . htmlspecialchars($port) . "\" />" .
426                                 "<input type=\"hidden\" name=\"path\" value=\"" . htmlspecialchars($path) . "\" />" .
427                                 "<input type=\"hidden\" name=\"id\" value=\"" . htmlspecialchars($id) . "\" />" .
428                                 "<input type=\"hidden\" name=\"debug\" value=\"$debug\" />" .
429                                 "<input type=\"hidden\" name=\"username\" value=\"" . htmlspecialchars($username) . "\" />" .
430                                 "<input type=\"hidden\" name=\"password\" value=\"" . htmlspecialchars($password) . "\" />" .
431                                 "<input type=\"hidden\" name=\"authtype\" value=\"$authtype\" />" .
432                                 "<input type=\"hidden\" name=\"verifyhost\" value=\"$verifyhost\" />" .
433                                 "<input type=\"hidden\" name=\"verifypeer\" value=\"$verifypeer\" />" .
434                                 "<input type=\"hidden\" name=\"cainfo\" value=\"" . htmlspecialchars($cainfo) . "\" />" .
435                                 "<input type=\"hidden\" name=\"proxy\" value=\"" . htmlspecialchars($proxy) . "\" />" .
436                                 "<input type=\"hidden\" name=\"proxyuser\" value=\"" . htmlspecialchars($proxyuser) . "\" />" .
437                                 "<input type=\"hidden\" name=\"proxypwd\" value=\"" . htmlspecialchars($proxypwd) . "\" />" .
438                                 "<input type=\"hidden\" name=\"responsecompression\" value=\"$responsecompression\" />" .
439                                 "<input type=\"hidden\" name=\"requestcompression\" value=\"$requestcompression\" />" .
440                                 "<input type=\"hidden\" name=\"clientcookies\" value=\"" . htmlspecialchars($clientcookies) . "\" />" .
441                                 "<input type=\"hidden\" name=\"protocol\" value=\"$protocol\" />" .
442                                 "<input type=\"hidden\" name=\"timeout\" value=\"" . htmlspecialchars($timeout) . "\" />" .
443                                 "<input type=\"hidden\" name=\"method\" value=\"" . htmlspecialchars($method) . "\" />" .
444                                 "<input type=\"hidden\" name=\"methodsig\" value=\"" . $i . "\" />" .
445                                 "<input type=\"hidden\" name=\"methodpayload\" value=\"" . htmlspecialchars($payload) . "\" />" .
446                                 "<input type=\"hidden\" name=\"altmethodpayload\" value=\"" . htmlspecialchars($alt_payload) . "\" />" .
447                                 "<input type=\"hidden\" name=\"wstype\" value=\"$wstype\" />" .
448                                 "<input type=\"hidden\" name=\"run\" value=\"now\" />" .
449                                 "<input type=\"hidden\" name=\"action\" value=\"wrap\" />" .
450                                 "<input type=\"submit\" value=\"Generate method call stub code\" />";
451                             echo "</form></td></tr>\n";
452                         }
453                     }
454                     echo "</tbody>\n</table>";
455
456                     break;
457
458                 case 'wrap':
459                     $r1 = $resp[0]->value();
460                     $r2 = $resp[1]->value();
461                     if ($r2->kindOf() != "array" || $r2->arraysize() <= $methodsig) {
462                         echo "Error: signature unknown\n";
463                     } else {
464                         $mdesc = $r1->scalarval();
465                         $msig = php_xmlrpc_decode($r2);
466                         $msig = $msig[$methodsig];
467                         $proto = $protocol == 2 ? 'https' : $protocol == 1 ? 'http11' : '';
468                         if ($proxy == '' && $username == '' && !$requestcompression && !$responsecompression &&
469                             $clientcookies == ''
470                         ) {
471                             $opts = 0; // simple client copy in stub code
472                         } else {
473                             $opts = 1; // complete client copy in stub code
474                         }
475                         if ($wstype == 1) {
476                             $prefix = 'jsonrpc';
477                         } else {
478                             $prefix = 'xmlrpc';
479                         }
480                         //$code = wrap_xmlrpc_method($client, $method, $methodsig, 0, $proto, '', $opts);
481                         $code = build_remote_method_wrapper_code($client, $method, str_replace('.', '_', $prefix . '_' . $method), $msig, $mdesc, $timeout, $proto, $opts, $prefix);
482                         //if ($code)
483                         //{
484                         echo "<div id=\"phpcode\">\n";
485                         highlight_string("<?php\n" . $code['docstring'] . $code['source'] . '?>');
486                         echo "\n</div>";
487                         //}
488                         //else
489                         //{
490                         //  echo 'Error while building php code stub...';
491                     }
492
493                     break;
494
495                 case 'execute':
496                     echo '<div id="response"><h2>Response:</h2>' . htmlspecialchars($response->serialize()) . '</div>';
497                     break;
498
499                 default: // give a warning
500             }
501         } // if !$response->faultCode()
502     } // if $response
503 } else {
504     // no action taken yet: give some instructions on debugger usage
505     ?>
506
507     <h3>Instructions on usage of the debugger:</h3>
508     <ol>
509         <li>Run a 'list available methods' action against desired server</li>
510         <li>If list of methods appears, click on 'describe method' for desired method</li>
511         <li>To run method: click on 'load method synopsis' for desired method. This will load a skeleton for method call
512             parameters in the form above. Complete all xmlrpc values with appropriate data and click 'Execute'
513         </li>
514     </ol>
515     <?php
516     if (!extension_loaded('curl')) {
517         echo "<p class=\"evidence\">You will need to enable the CURL extension to use the HTTPS and HTTP 1.1 transports</p>\n";
518     }
519     ?>
520
521     <h3>Example:</h3>
522     <p>
523         Server Address: phpxmlrpc.sourceforge.net<br/>
524         Path: /server.php
525     </p>
526
527     <h3>Notice:</h3>
528     <p>all usernames and passwords entered on the above form will be written to the web server logs of this server. Use
529         with care.</p>
530
531     <h3>Changelog</h3>
532     <ul>
533         <li>2007-02-20: add visual editor for method payload; allow strings, bools as jsonrpc msg id</li>
534         <li>2006-06-26: support building php code stub for calling remote methods</li>
535         <li>2006-05-25: better support for long running queries; check for no-curl installs</li>
536         <li>2006-05-02: added support for JSON-RPC. Note that many interesting json-rpc features are not implemented
537             yet, such as notifications or multicall.
538         </li>
539         <li>2006-04-22: added option for setting custom CA certs to verify peer with in SSLmode</li>
540         <li>2006-03-05: added option for setting Basic/Digest/NTLM auth type</li>
541         <li>2006-01-18: added option echoing to screen xmlrpc request before sending it ('More' debug)</li>
542         <li>2005-10-01: added option for setting cookies to be sent to server</li>
543         <li>2005-08-07: added switches for compression of requests and responses and http 1.1</li>
544         <li>2005-06-27: fixed possible security breach in parsing malformed xml</li>
545         <li>2005-06-24: fixed error with calling methods having parameters...</li>
546     </ul>
547 <?php
548
549 }
550 ?>
551 </body>
552 </html>