Skip to main content

How to get results data from json using $xmlapi.

Comments

2 comments

  • Krystalogik
    OK, so I managed to figure that one out. What I needed was: [PHP] if($result['result">[0]['status"> == 0) { echo 'Account activation failed!'; } else { echo 'Account activation successful.'; }[/PHP] Now I have a json result for chaning passwords I cant figure out Result: [PHP]array(1) { ["passwd">=> array(1) { [0]=> array(4) { ["statusmsg">=> string(40) "Password changed for user "USERNAME""." ["services">=> array(4) { [0]=> array(1) { ["app">=> string(6) "system" } [1]=> array(1) { ["app">=> string(3) "ftp" } [2]=> array(1) { ["app">=> string(4) "mail" } [3]=> array(1) { ["app">=> string(5) "MySQL" } } ["rawout">=> string(135) "Password for "locpweb"" has been changed. Updating FTP passwords for USERNAME FTP password files updated. FTP vhost passwords synced " ["status">=> int(1) } } [/PHP] Totally lost as to what I need to get the STATUS part of this into a usable variable (like the $result['result">[0]['status"> as in the last one). [COLOR="silver">- - - Updated - - - Figured it out: $result['passwd">[0]['status">
    0
  • cPanelMichael
    Hello :) I am happy to see you were able to address the issue. Thank you for updating us with the outcome.
    0

Please sign in to leave a comment.