stugster Posted April 2, 2010 Share Posted April 2, 2010 Hi Guys, I'm just playing, so this is by no means a high priority. I have a very basic PHP script that grabs the stats using the API command: $postfields["action"] = "getstats"; This works fine, and it outputs the raw array in the form: print_r($results); However, when I go and change the action from "getstats" to "gettickets", I get the error without a $results['message'] included. The error is generated from the lines: if ($results["result"]=="success") { # Result was OK print_r($results); } else { # An error occured [b] echo "The following error occured: ".$results["message"];[/b] } The code hasn't been changed in any other way, with the exception of adding the print_r($results); line, and of course, changing the "getstats" to "gettickets". I'm using the example API as provided here: http://wiki.whmcs.com/API:Example_Usage Any ideas? 0 Quote Link to comment Share on other sites More sharing options...
stugster Posted April 2, 2010 Author Share Posted April 2, 2010 Excuse my retardations - I just realised it's outputing the data as XML. Problem solved. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.