Skip to main content

API returns js and/or html in json responses

Comments

1 comment

  • morissette
    Able to replicate: root@dev [~]# php test.php object(SimpleXMLElement)#2 (1) { ["result">=> object(SimpleXMLElement)#3 (2) { ["status">=> string(1) "1" ["statusmsg">=> string(750) " Changing Shell to /bin/false...Changing shell for kyle. Warning: "/bin/false" is not listed in /etc/shells Shell changed. Done Locking Password...Locking password for user kyle. passwd: Success Done 1Suspending email account logins for kyle.dev.box.net .... Done Suspending email account logins for kyle.box.net .... Done Suspending mysql users Using Universal Quota Support (quota=0) Suspended document root /home/kyle/public_html Using Universal Quota Support (quota=0) Updating ftp passwords for kyle Ftp password files updated. Ftp vhost passwords synced kyle's account has been suspended " } } I'd recommend just using the status returned and creating your own statusmsg otherwise you can strip using preg_replace in php or =~ s///g in perl
    0

Please sign in to leave a comment.