{"id":58,"date":"2009-10-30T10:46:54","date_gmt":"2009-10-30T15:46:54","guid":{"rendered":"http:\/\/blogs.wp.stage.cpanel.net\/2009\/10\/xml_api_php_class_version_10\/"},"modified":"2009-10-30T10:46:54","modified_gmt":"2009-10-30T15:46:54","slug":"xml_api_php_class_version_10","status":"publish","type":"post","link":"https:\/\/devel.www.cpanel.net\/blog\/products\/xml_api_php_class_version_10\/","title":{"rendered":"XML API PHP class version 1.0"},"content":{"rendered":"

Some of the reasons why there hasn\u2019t been many updates lately include our cPanel conference, the cPanel\/WHM 11.25.0 release, and the release of the XML-API PHP class 1.0.\u00a0 If you are not familiar with the XML-API PHP class, it makes interacting with the XML-API much more simple by implementing functions that allow you to call your remote cPanel server without ever having to touch cURL or simplexml.\u00a0 This works by implementing a function for every XML-API call.\u00a0 For example:
\n$xmlapi = new xmlapi($ip, \u201croot\u201d, $root_pass);
\n$zones = $xmlapi->listzones();
\n<\/code>
\nThe code above will make $zones a simplexml object that contains all of the zones on the server.\u00a0 This combined with proper data handling (encoding), the ability to return associative arrays, simplexml objects, raw JSON or raw XML makes developing PHP applications for the XML-API rather simple.<\/p>\n

The biggest change in this version is the fact that the class is full documented, allowing you to access a quick reference for looking up these functions and how they work.<\/p>\n

This version is a complete re-write from the previous version.\u00a0 The (partial) change log is below:<\/p>\n