{"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: 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 If you are interested in working with the XML-API PHP Class, you can download it here.\u00a0 If you want to provide feedback, bugs, or comments you can do so from the developer\u2019s discussion forum<\/a><\/p>\n It should be noted that this is not an supported<\/em> class, but rather released as reference code.\u00a0 If you need assistance with the class, the forum is the proper place to ask for help.<\/p>\n","protected":false},"excerpt":{"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 […]<\/p>\n","protected":false},"author":77,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[49],"tags":[],"class_list":["post-58","post","type-post","status-publish","format-standard","hentry","category-products"],"acf":[],"yoast_head":"\n
\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\n