Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    cPanel Partner NOC This forum account has been confirmed by cPanel staff to represent a vendor.cPanel Partner NOC Badge
    Join Date
    Nov 2001
    Location
    San Clemente, Ca
    Posts
    703

    Default XML/JSON inside the WHM

    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 Code:
    <?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.
    Shaun Reitan
    NDCHost.com - cPlicensing.net - ProVPS.com
    Contact us for your cPanel Licensing needs! We Price Match, We provide Support, We take care of our customers!

  2. #2
    cPanel Staff cPanelMatt's Avatar
    Join Date
    Apr 2005
    Location
    Houston, TX
    Posts
    409

    Default

    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..
    Matt Dees
    Integration Developer
    cPanel, Inc.
    cPanel Integration Blog

Similar Threads & Tags
Similar threads

  1. is XML/JSON-API available only to WHM accounts?
    By eschminke in forum cPanel Developers
    Replies: 6
    Last Post: 12-02-2011, 03:35 PM
  2. DNS Setup/edit domain forwarding via XML/JSON API
    By abrakadabra in forum Feature Requests for cPanel/WHM
    Replies: 2
    Last Post: 09-02-2011, 06:24 AM
  3. XML or JSON API?
    By Azavia in forum cPanel Developers
    Replies: 3
    Last Post: 05-21-2010, 12:16 PM
  4. Replies: 1
    Last Post: 11-24-2009, 03:42 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube