- if(isset($HTTP_POST_VARS["stateno"]) && $HTTP_POST_VARS["stateno"]!="")
- {
- $stateno=(integer)$HTTP_POST_VARS["stateno"];
- $f=new xmlrpcmsg('examples.getStateName',
- array(php_xmlrpc_encode($stateno))
- );
- print "<pre>Sending the following request:\n\n" . htmlentities($f->serialize()) . "\n\nDebug info of server data follows...\n\n";
- $c=new xmlrpc_client("/server.php", "phpxmlrpc.sourceforge.net", 80);
- $c->setDebug(1);
- $r=&$c->send($f);
- if(!$r->faultCode())
- {
- $v=$r->value();
- print "</pre><br/>State number " . $stateno . " is "
- . htmlspecialchars($v->scalarval()) . "<br/>";
- // print "<HR>I got this value back<BR><PRE>" .
- // htmlentities($r->serialize()). "</PRE><HR>\n";
- }
- else
- {
- print "An error occurred: ";
- print "Code: " . htmlspecialchars($r->faultCode())
- . " Reason: '" . htmlspecialchars($r->faultString()) . "'</pre><br/>";
- }
- }
- else
- {
- $stateno = "";
- }
+ if(isset($HTTP_POST_VARS["stateno"]) && $HTTP_POST_VARS["stateno"]!="")
+ {
+ $stateno=(integer)$HTTP_POST_VARS["stateno"];
+ $f=new xmlrpcmsg('examples.getStateName',
+ array(php_xmlrpc_encode($stateno))
+ );
+ print "<pre>Sending the following request:\n\n" . htmlentities($f->serialize()) . "\n\nDebug info of server data follows...\n\n";
+ $c=new xmlrpc_client("/server.php", "phpxmlrpc.sourceforge.net", 80);
+ $c->setDebug(1);
+ $r=&$c->send($f);
+ if(!$r->faultCode())
+ {
+ $v=$r->value();
+ print "</pre><br/>State number " . $stateno . " is "
+ . htmlspecialchars($v->scalarval()) . "<br/>";
+ // print "<HR>I got this value back<BR><PRE>" .
+ // htmlentities($r->serialize()). "</PRE><HR>\n";
+ }
+ else
+ {
+ print "An error occurred: ";
+ print "Code: " . htmlspecialchars($r->faultCode())
+ . " Reason: '" . htmlspecialchars($r->faultString()) . "'</pre><br/>";
+ }
+ }
+ else
+ {
+ $stateno = "";
+ }