Re: Please Help!!
Gaetano Giunta <[email protected]> Sun, 23 May 2010 15:12:47 +0200
| Newsgroups | gmane.comp.php.xml-rpc |
|---|---|
| Message-ID | <[email protected]> |
Renzo J. Ezagui <[email protected]> wrote on 20/05/2010 06:49: > I need to evaluate some variables which are send it from a mobile > application via XML-RPC. > I know that the application is sending me this XML: > > -- this is an example -- > <value><struct> > <member><name>product</name> > <value><i4>1</i4></value> > </member> > <member><name>license</name> > <value><string>56621365</string></value> > </member> > <member><name>pin</name> > <value><string>216B22DD</string></value> > </member> > <member><name>version</name> > <value><i4>3</i4></value> > </member> > </struct></value> > > i need to have in PHP decoded vars that information > (product,license,pin,version) > > i did this to know the XML: > > <?php > include("../lib/xmlrpc.inc"); > include("../lib/xmlrpcs.inc"); > function info ( $params ){ > $t=$params->getParam(0); > $tamano = $t->serialize(); > $file = "data.txt"; > $file_handle = fopen($file,"a"); > fwrite($file_handle, "$tamano \n" ); > fclose($file_handle); > } > $s=new xmlrpc_server(array("activate" =>array("function" => "info"))); > ?> > > now a i want to store (product,license,pin,version) in vars like $prod > $lic $pin $vers but i cant decode it or extract them from the message or > from this string that i already printed to a file. the easiest way to map a phpxmlrpcval object (what $tamano is in the example above) is to use the php_xmlrpc_decode function var_export( php_xmlrpc_decode( $tamano ) ); bye Gaetano > Please help, sorry for my crappy english > > > > _______________________________________________ > phpxmlrpc mailing list > [email protected] > http://lists.usefulinc.com/cgi-bin/mailman/listinfo/phpxmlrpc >