Pierwszy kod który się w tym poscie si epojawil to wynik tego zapytania które jest poniżej.
POnizej przedstawiam zmieniony kod, który wyświetla tylko to, ale nie wyswietla czy domena jest zajeta czy wolna.
<?
$sCommand = '<?xml version="1.0" encoding="ISO-8859-2"?>
<interface version="1.0">
<command>
<check>
<domain>
<name>' .$domena. '</name>
</domain>
</check>
</command>
</interface>';
$rSession = curl_init("*************");
curl_setopt
($rSession, CURLOPT_HTTPHEADER
, array(***************));curl_setopt($rSession, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($rSession, CURLOPT_POST, 2);
curl_setopt($rSession, CURLOPT_POSTFIELDS, $sCommand);
$sResult = curl_exec($rSession);
$xml = simplexml_load_string($sCommand);
print_r ($xml->response->domain->reason->message);
curl_close($rSession);
?>
a print_r($sCommand);
dał taki wynik:
SimpleXMLElement Object
(
[@attributes] => Array
(
[version] => 1.0
)
[command] => SimpleXMLElement Object
(
[check] => SimpleXMLElement Object
(
[domain] => SimpleXMLElement Object
(
[name] => domena.pl
)
)
)
)