Parse XMLRPC response using PHP

masufasu

New Member
I'm looking for help parsing a response when using XMLRPC with php. Here is my code,\[code\]$f->addParam(new xmlrpcval("test", "string")) ; $f->addParam(new xmlrpcval("test_status=true,dups=false,cv2=123", "string")) ; // Options print "<pre>sending data ...\n" . htmlentities($f->serialize()) . "... end of send\n</pre>";$c=new xmlrpc_client("/secxmlrpc/make_call", "www.secpay.com", 443);$c->setDebug(1);$r=$c->send($f,20,"https");\[/code\]As this is in debug mode my output is as follows, my question is - how do I access the xml response? Can I store it in a variable and then use xmlrpc_decode?\[code\]---GOT---HTTP/1.1 200 OKServer: Apache-Coyote/1.1Content-Type: text/xmlDate: Mon, 28 May 2012 10:51:08 GMTConnection: Keep-AliveContent-Length: 264<?xml version="1.0"?><methodResponse><params><param><value>?valid=true&trans_id=TRAN0001&code=A&auth_code=9999&message=TEST AUTH&amount=10.51&cv2avs=DATA NOT CHECKED&test_status=true</value></param></params></methodResponse>---END---HEADER: server: Apache-Coyote/1.1HEADER: content-type: text/xmlHEADER: date: Mon, 28 May 2012 10:51:08 GMTHEADER: connection: Keep-AliveHEADER: content-length: 264---PARSED---xmlrpcval::__set_state(array( 'me' => array ( 'string' => '?valid=true&trans_id=TRAN0001&code=A&auth_code=9999&message=TEST AUTH&amount=10.51&cv2avs=DATA NOT CHECKED&test_status=true', ), 'mytype' => 1, '_php_class' => NULL,))---END---\[/code\]Many thanks.
 
Back
Top