Jump to content

API: gettickets


stugster

Recommended Posts

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated