- var_dump: documentation ( source)
- json_decode: documentation ( source)
- simplexml_load_string: documentation ( source)
- htmlspecialchars: documentation ( source)
- json_encode: documentation ( source)
<?php
$client = new SoapClient("http://clublinq.com/marylandlive/clublinq.svc?singleWSDL",array(
"trace"=>1,
"exceptions"=>0)
);
$req->KeyID = "1B3BFE04-78AF-4B84-967E-C32BA0B30FB0";
$req->PlayerID="2588";
$parameters->request = $req;
$obj = $client->GetCustomerInfo(array('request'=>(array('KeyID'=>"1B3BFE04-78AF-4B84-967E-C32BA0B30FB0",'PlayerID'=>'2588'))));
$xml = $client->__getLastResponse();
//$xml = simplexml_load_string($client->__getLastRequest());
//$xml = new SimplexmlElement($client->__getLastResponse(), TRUE);
$json= json_encode($client->__getLastResponse());
print "<pre>\n";
print "<br />\n Request : ".htmlspecialchars($client->__getLastRequest());
print "<br />\n Response: ".htmlspecialchars($client->__getLastResponse());
print "<br />\n xml: ".$xml;
print "<br />\n JSON: ".$json;
print "</pre>";
$array = json_decode(json_encode((array)simplexml_load_string($xml)),1);
var_dump($array)
?>