Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

XML/JSON inside the WHM

Discussion in 'cPanel Developers' started by shaun, Oct 19, 2009.

  1. shaun

    shaun Well-Known Member

    Joined:
    Nov 9, 2001
    Messages:
    698
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    San Clemente, Ca
    Your documentation keeps saying to use the XML/JSON stuff you have out now. The examples always show a URL to get the data. How would you guys recommend interfacing with the WHM for WHM Pluggins? I suppose i could just do a
    PHP:
    <?PHP $xml file_get_contents('http://127.0.0.1:2086//xml-api/listaccts'); ?> 
    but that seams kinda funky.

    Also do you guys have any documentation on templates or functions that may exist to keep a WHM pluggin fitting the look and feel of the WHM theme. For example in your addon_configsupport.cgi you use defheader("Support Request Configuration"); to define a header at the top of the page.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. MattDees

    MattDees Well-Known Member

    Joined:
    Apr 29, 2005
    Messages:
    416
    Likes Received:
    1
    Trophy Points:
    243
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Shaun,
    I'd like to talk to you a little more in depth about this (regarding documentation), you should know how to get ahold of me privately.

    However, I always recommend using the PHP class (see first sticky thread in this forum) for handling XML-API requests. As far things built into our product, most of the XML-API calls are done via internal methods that aren't exposed via modules..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice