Hi Guys,
Im pretty sure im having a slow day but i cant for the life of me seem to get the data out of the responce object.
spits out something like this:
however, i cant access any of those in PHP.
i've tried all sorts, from accessing the properties directly:
to looping over it:
which gives:
and i still cant access that. I've tried looping over it, i've also tried accessing the object key ($account->user{'0'}) no joy ether.
So, what on earth am i missing?
Im pretty sure im having a slow day but i cant for the life of me seem to get the data out of the responce object.
PHP:
print "<pre>";
print_r($xmlapi->accountsummary('username'));
print "</pre>";
Code:
SimpleXMLElement Object
(
[acct] => SimpleXMLElement Object
(
[backup] => 0
[disklimit] => 2000M
[diskused] => 372M
[domain] => ***
[email] => ***
[ip] => ***
[is_locked] => 0
[legacy_backup] => 1
[max_defer_fail_percentage] => unlimited
[max_email_per_hour] => unlimited
[maxaddons] => *unknown*
[maxftp] => unlimited
[maxlst] => unlimited
[maxparked] => 2
[maxpop] => unlimited
[maxsql] => unlimited
[maxsub] => unlimited
[min_defer_fail_to_trigger_protection] => 5
[owner] => ***
[partition] => home
[plan] => Standard
[shell] => /usr/local/cpanel/bin/noshell
[startdate] => 14 Feb 14 15:58
[suspended] => 0
[suspendreason] => not suspended
[suspendtime] => SimpleXMLElement Object
(
)
[theme] => x3
[unix_startdate] => 1392393516
[user] => ***
)
[status] => 1
[statusmsg] => Ok
)
i've tried all sorts, from accessing the properties directly:
PHP:
print($username->acct->user);
PHP:
foreach($ar13bakk->acct as $key => $account){
print_r($account->user);
}
Code:
SimpleXMLElement Object
(
[0] => ar13bakk
)
So, what on earth am i missing?