X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=demo%2Fclient%2Fwhich.php;h=6664e2f0156195eaec12c7fe795a7c1d144b9fd8;hb=f1e595deaca76bd28257adb82916624ac59eb5b1;hp=0699c8bb6e307bb0d5923fbbcc50abbbb53f4eeb;hpb=26ac91603dc5dab166667622bbc5e7de6d585f3c;p=plcapi.git diff --git a/demo/client/which.php b/demo/client/which.php index 0699c8b..6664e2f 100644 --- a/demo/client/which.php +++ b/demo/client/which.php @@ -1,32 +1,29 @@ - -xmlrpc - -

Which toolkit demo

-

Query server for toolkit information

-

The code demonstrates usage of the php_xmlrpc_decode function

-send($f); - if(!$r->faultCode()) - { - $v = php_xmlrpc_decode($r->value()); - print "
";

-		print "name: " . htmlspecialchars($v["toolkitName"]) . "\n";

-		print "version: " . htmlspecialchars($v["toolkitVersion"]) . "\n";

-		print "docs: " . htmlspecialchars($v["toolkitDocsUrl"]) . "\n";

-		print "os: " . htmlspecialchars($v["toolkitOperatingSystem"]) . "\n";

-		print "
"; - } - else - { - print "An error occurred: "; - print "Code: " . htmlspecialchars($r->faultCode()) . " Reason: '" . htmlspecialchars($r->faultString()) . "'\n"; - } -?> -
-$Id$ - - + +xmlrpc - Which toolkit demo + +

Which toolkit demo

+

Query server for toolkit information

+

The code demonstrates usage of the PhpXmlRpc\Encoder class

+

You can see the source to this page here: which.php

+send($req); +if (!$resp->faultCode()) { + $encoder = new PhpXmlRpc\Encoder(); + $value = $encoder->decode($resp->value()); + print "Toolkit info:
\n"; + print "
";
+    print "name: " . htmlspecialchars($value["toolkitName"]) . "\n";
+    print "version: " . htmlspecialchars($value["toolkitVersion"]) . "\n";
+    print "docs: " . htmlspecialchars($value["toolkitDocsUrl"]) . "\n";
+    print "os: " . htmlspecialchars($value["toolkitOperatingSystem"]) . "\n";
+    print "
"; +} else { + print "An error occurred: "; + print "Code: " . htmlspecialchars($resp->faultCode()) . " Reason: '" . htmlspecialchars($resp->faultString()) . "'\n"; +} +?> + +