The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    16
    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.
     
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    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..
     
Loading...

Share This Page