Fix newlines (to satisfy automated code quality scanners)
[plcapi.git] / demo / client / which.php
1 <html>
2 <head><title>xmlrpc</title></head>
3 <body>
4 <h1>Which toolkit demo</h1>
5 <h2>Query server for toolkit information</h2>
6 <h3>The code demonstrates usage of the php_xmlrpc_decode function</h3>
7 <?php
8 include "xmlrpc.inc";
9 $f = new xmlrpcmsg('interopEchoTests.whichToolkit', array());
10 $c = new xmlrpc_client("/server.php", "phpxmlrpc.sourceforge.net", 80);
11 $r = $c->send($f);
12 if (!$r->faultCode()) {
13     $v = php_xmlrpc_decode($r->value());
14     print "<pre>";
15     print "name: " . htmlspecialchars($v["toolkitName"]) . "\n";
16     print "version: " . htmlspecialchars($v["toolkitVersion"]) . "\n";
17     print "docs: " . htmlspecialchars($v["toolkitDocsUrl"]) . "\n";
18     print "os: " . htmlspecialchars($v["toolkitOperatingSystem"]) . "\n";
19     print "</pre>";
20 } else {
21     print "An error occurred: ";
22     print "Code: " . htmlspecialchars($r->faultCode()) . " Reason: '" . htmlspecialchars($r->faultString()) . "'\n";
23 }
24 ?>
25 </body>
26 </html>