X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=demo%2Fclient%2Fzopetest.php;fp=demo%2Fclient%2Fzopetest.php;h=84102a598d6b7921f74de9ffaf4dc90f831c35ef;hb=172e482d9aa27d7866d7a38fea8be90182480b79;hp=7ecfeb5c6e876c7097bdfdb40507bfe87ace9f1e;hpb=31d3cedaafa355e5682d55a3d7178b53aedfbaa0;p=plcapi.git
diff --git a/demo/client/zopetest.php b/demo/client/zopetest.php
index 7ecfeb5..84102a5 100644
--- a/demo/client/zopetest.php
+++ b/demo/client/zopetest.php
@@ -4,26 +4,26 @@
Zope test demo
The code demonstrates usage of basic authentication to connect to the server
setCredentials("username", "password");
- $c->setDebug(2);
- $r = $c->send($f);
- if(!$r->faultCode())
- {
- $v = $r->value();
- print "I received:" . htmlspecialchars($v->scalarval()) . "
";
- print "
I got this value back
pre>" .
- htmlentities($r->serialize()). "\n";
- }
- else
- {
- print "An error occurred: ";
- print "Code: " . htmlspecialchars($r->faultCode())
- . " Reason: '" . ($r->faultString()) . "'
";
- }
+ $f = new xmlrpcmsg('document_src', array());
+ $c = new xmlrpc_client("/index_html", "pingu.heddley.com", 9080);
+ $c->setCredentials("username", "password");
+ $c->setDebug(2);
+ $r = $c->send($f);
+ if(!$r->faultCode())
+ {
+ $v = $r->value();
+ print "I received:" . htmlspecialchars($v->scalarval()) . "
";
+ print "
I got this value back
pre>" .
+ htmlentities($r->serialize()). "\n";
+ }
+ else
+ {
+ print "An error occurred: ";
+ print "Code: " . htmlspecialchars($r->faultCode())
+ . " Reason: '" . ($r->faultString()) . "'
";
+ }
?>