parsing xml with xmlapi.php
I'm trying to only display the domains for parked domains. But I don't return anything. Can anyone help?
[PHP]
include("xmlapi.php");
$xmlapi = new xmlapi($server_ip);
$xmlapi->hash_auth($whm_user,$whm_hash);
$xmlapi->return_xml(1);
$xmlapi->set_output("xml");
$data = $xmlapi->api2_query($cp_user, "Park", "listparkeddomains" );
$xml_object = simplexml_load_string($data);
foreach($xml_object->cpanelresult->data as $key => $value)
{
echo $value->domain;
}
[/PHP]
-
Solution [PHP]foreach($xml_object->data as $key => $value) { echo $value->domain."
"; }[/PHP]0 -
I am happy to see you were able to find a solution. Thank you for updating the thread with the outcome. 0
Please sign in to leave a comment.
Comments
2 comments