More tabs/to/spaces conversion, plus remove closing php tags as they are not consider...
[plcapi.git] / demo / client / zopetest.php
1 <html>
2 <head><title>xmlrpc</title></head>
3 <body>
4 <h1>Zope test demo</h1>
5 <h3>The code demonstrates usage of basic authentication to connect to the server</h3>
6 <?php
7     include("xmlrpc.inc");
8
9     $f = new xmlrpcmsg('document_src', array());
10     $c = new xmlrpc_client("/index_html", "pingu.heddley.com", 9080);
11     $c->setCredentials("username", "password");
12     $c->setDebug(2);
13     $r = $c->send($f);
14     if(!$r->faultCode())
15     {
16         $v = $r->value();
17         print "I received:" . htmlspecialchars($v->scalarval()) . "<br/>";
18         print "<hr/>I got this value back<br/>pre>" .
19         htmlentities($r->serialize()). "</pre>\n";
20     }
21     else
22     {
23         print "An error occurred: ";
24         print "Code: " . htmlspecialchars($r->faultCode())
25             . " Reason: '" . ($r->faultString()) . "'<br/>";
26     }
27 ?>
28 <hr/>
29 <em>$Id$</em>
30 </body>
31 </html>