<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
    <title>cPanel Integration</title>
    <link rel="alternate" type="text/html" href="http://www.cpanel.net/blog/integration/" />
    
    <id>tag:www.cpanel.net,2009-08-10:/blog/integration/62</id>
    <updated>2012-04-02T09:01:27Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.25</generator>

<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/cpanel/blog/integration" /><feedburner:info uri="cpanel/blog/integration" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>cpanel/blog/integration</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/cpanel/blog/integration" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fcpanel%2Fblog%2Fintegration" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><feedburner:browserFriendly>cPanel</feedburner:browserFriendly><entry>
    <title>Developing with LiveAPI</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/7o6zV5U7jl4/developing-with-liveapi.html" />
    <id>tag:www.cpanel.net,2012:/blog/integration//62.10046</id>

    <published>2012-04-02T08:58:45Z</published>
    <updated>2012-04-02T09:01:27Z</updated>

    <summary><![CDATA[In earlier versions of cPanel, developers included a script called LivePHP. This technology is essentially an internal window on the server to make API 1 and API 2 calls to the local machine via a socket to cpsrvd. &nbsp;Through LivePHP,...]]></summary>
    <author>
        <name>Aaron</name>
        
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;In earlier versions of cPanel, developers included a script called &lt;a href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/LivePHP"&gt;&lt;span class="s2"&gt;LivePHP&lt;/span&gt;&lt;/a&gt;. This technology is essentially an internal window on the server to make API 1 and API 2 calls to the local machine via a socket to cpsrvd. &amp;nbsp;Through LivePHP, you could use API functions through API tags and our Remote XML or JSON API. &amp;nbsp;This is the suggested best practice for accessing cPanel functionality from your Plugins for reasons of simplification and also reducing network overhead.&lt;/p&gt;&lt;p class="p2"&gt;Where previously the Live environment only included PHP, we have now expanded it to include multiple languages, Ruby, Python, Perl, as well as PHP; and have renamed it &lt;a href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/LivePHP"&gt;&lt;span class="s2"&gt;LiveAPI&lt;/span&gt;&lt;/a&gt;.&lt;/p&gt; &lt;p class="p2"&gt;cPanel ships with example scripts for both PHP and Perl. &amp;nbsp;Both scripts can be found in the x3 directory (/usr/local/cpanel/base/frontend/x3/) of your cPanel installation. The scripts are named test.live.php and test.live.pl.&lt;/p&gt; &lt;p class="p2"&gt;For reading about specific module usage for LiveAPI, please see our &lt;a href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/LiveAPI"&gt;documentation&lt;/a&gt;.&amp;nbsp; Or if you have usage questions along the way, please feel free to post in our &lt;a href="http://forums.cpanel.net/cpanel-developers.html"&gt;developer forums &lt;/a&gt;where we have dedicated cPanel development staff available to help.&lt;/p&gt;
        
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/7o6zV5U7jl4" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2012/04/developing-with-liveapi.html</feedburner:origLink></entry>

<entry>
    <title>Create Custom cPanel Modules</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/dYaVdJFUv_g/create-custom-cpanel-modules.html" />
    <id>tag:www.cpanel.net,2012:/blog/integration//62.9974</id>

    <published>2012-02-22T12:55:54Z</published>
    <updated>2012-02-22T12:57:51Z</updated>

    <summary><![CDATA[Nearly all cPanel actions are governed by cPanel API1 and API2 functions.For your application, instead of creating your own API from scratch, we're created the ability to add your application's logic to the cPanel XML/JSON API.&nbsp; Essentially speaking, your custom...]]></summary>
    <author>
        <name>Aaron</name>
        
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Plugins" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;Nearly all cPanel actions are governed by cPanel API1 and API2 functions.&lt;/span&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;For your application, instead of creating your own API from scratch, we're created the ability to add your application's logic to the cPanel XML/JSON API.&amp;nbsp; Essentially speaking, your custom cPanel Perl Module can create a remote window of access to your application's functions to be used through the XML/JSON APIs, LiveAPI, or cPanel tags.&lt;/span&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;The ability to build and use Custom cPanel Modules is available in all current versions of cPanel.&lt;/span&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;We've updated [our documentation] &amp;lt;- (&lt;/span&gt;&lt;a rel="nofollow" href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/WritingCpanelModules" style="color: rgb(153, 51, 136); text-decoration: none; font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/WritingCpanelModules&lt;/a&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;) and have provided a complete, working example of a [custom cPanel Perl module] &amp;lt;- (&lt;/span&gt;&lt;a rel="nofollow" href="https://github.com/CpanelInc/Custom-cPanel-Module" style="color: rgb(153, 51, 136); text-decoration: none; font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;https://github.com/CpanelInc/Custom-cPanel-Module&lt;/a&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;), available for download on [our Github account] &amp;lt;- (&lt;/span&gt;&lt;a rel="nofollow" href="https://github.com/CpanelInc" style="color: rgb(153, 51, 136); text-decoration: none; margin-bottom: 0px; font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;https://github.com/CpanelInc&lt;/a&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;).&amp;nbsp; This example Perl module, it's inline comments and POD documentation, along with prior existing documentation, should provide a great resource for anyone wishing to leverage the cPanel API!&lt;/span&gt;&lt;/p&gt;
        
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/dYaVdJFUv_g" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2012/02/create-custom-cpanel-modules.html</feedburner:origLink></entry>

<entry>
    <title>Test it in the User Interface</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/BrOqLC2F8Ck/test-it-in-the-user-interface.html" />
    <id>tag:www.cpanel.net,2012:/blog/integration//62.9970</id>

    <published>2012-02-22T12:53:27Z</published>
    <updated>2012-02-22T13:04:50Z</updated>

    <summary><![CDATA[After spending time in the Developer section of the cPanel Community Forums, we've found a commonly asked question: &quot;Why won't my script work with XYZ function using the XML/JSON-API?&quot;Rewinding a bit, the purpose of the XML/JSON API is to allow...]]></summary>
    <author>
        <name>Aaron</name>
        
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;After spending time in the Developer section of the cPanel Community Forums, we've found a commonly asked question: &amp;quot;Why won't my script work with XYZ function using the XML/JSON-API?&amp;quot;&lt;/span&gt;&lt;br style="margin-top: 0px; font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;Rewinding a bit, the purpose of the XML/JSON API is to allow usage of cPanel &amp;amp; WHM functions through applications or scripts.&amp;nbsp; Naturally, the first question we often ask, when trying to figure out why a script isn't working, is if the user is trying to do something that they couldn't normally do through cPanel &amp;amp; WHM.&lt;/span&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;For example, let's say you're trying to park a domain on top of an existing domain. Parking a domain is like adding an additional domain name for the same content in your hosting account. Given this option is allowed by your hosting provider, the first thing to do would be to attempt to add the parked domain through cPanel. Running through the process of parking the domain through cPanel will give you, the user, a good sense of what's actually happening when parking a domain.&lt;/span&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;After testing through the interface and finding out more about the function, the next step would be to consult our documentation at sdk.cPanel.net to find more about the module name and function.&amp;nbsp; Following the parking a domain example, &amp;lt;a href=&amp;quot;&lt;/span&gt;&lt;a rel="nofollow" style="color: rgb(153, 51, 136); text-decoration: none; font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " href="http://docs.cpanel.net/twiki/bin/view/ApiDocs/Api2/ApiPark"&gt;http://docs.cpanel.net/twiki/bin/view/ApiDocs/Api2/ApiPark&lt;/a&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;we find in the documentation&amp;lt;/a&amp;gt; that the name of the module is &amp;quot;Park&amp;quot;, with function &amp;quot;park&amp;quot;. (On a side note, there are also other functions available within the Park module, including &amp;quot;unpark&amp;quot;, &amp;quot;listparkeddomains&amp;quot;, and &amp;quot;listaddondomains&amp;quot;.)&lt;/span&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;In this case, we're only interested in using the &amp;quot;domain&amp;quot; parameter, since we're wanting to park the new domain on the primary domain for the account. If the user wanted to park a domain onto a subdomain in the account, the user would also use the parameter, &amp;quot;topdomain&amp;quot;. This parameter would contain the name of the subdomain to attach the new parked domain to. Often, the error in the script has to do with incorrect parameters, or the order of parameters (for API1 functions) within the array.&lt;/span&gt;&lt;br style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;br style="margin-bottom: 0px; font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; " /&gt;&lt;span style="font-family: Verdana, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; "&gt;So after testing the function through cPanel, then making sure you have the correct parameters passed in through the XML/JSON-API, you should be well on your way to troubleshooting your script.&lt;/span&gt;&lt;/p&gt;
        
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/BrOqLC2F8Ck" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2012/02/test-it-in-the-user-interface.html</feedburner:origLink></entry>

<entry>
    <title>Making your script work with security tokens in cPanel &amp; WHM</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/xCRmtWKnLKU/making-your-script-work-with-security-tokens-in-cpanel-whm.html" />
    <id>tag:www.cpanel.net,2012:/blog/integration//62.9938</id>

    <published>2012-01-12T13:51:00Z</published>
    <updated>2012-01-12T13:52:01Z</updated>

    <summary><![CDATA[What is a security token? &ldquo;Security token&rdquo; URLs were added in cPanel &amp; WHM 11.25 as a&nbsp;security&nbsp;measure, and they were enabled by default in version 11.28. They help combat a common type of attack called a Cross-Site Request Forgery (XSRF)....]]></summary>
    <author>
        <name>Dan Muey</name>
        
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="token" label="token" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;&lt;strong&gt;What is a security token?&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&amp;ldquo;Security token&amp;rdquo; URLs were added in cPanel &amp;amp; WHM 11.25 as a&amp;nbsp;security&amp;nbsp;measure, and they were enabled by default in version 11.28. They help combat a common type of attack called a Cross-Site Request Forgery (XSRF).&lt;/p&gt; &lt;p&gt;So, what does a &amp;ldquo;security token&amp;rdquo; look like? Take, for example, this URL:&lt;/p&gt; &lt;p&gt;&lt;code&gt;https://example.com:2087/i/love/cpanel&lt;/code&gt;&lt;/p&gt; &lt;p&gt;With security tokens enabled, this would become:&lt;/p&gt; &lt;p&gt;&lt;code&gt;https://example.com:2087/cpsessYYYYYYY/i/love/cpanel&lt;/code&gt;&lt;/p&gt; &lt;p&gt;In that example, &lt;em&gt;cpsessYYYYYYY&lt;/em&gt; is the token unique to that logged-in user on that browser.&lt;/p&gt; &lt;p&gt;&amp;nbsp;(You can learn more about security tokens in cPanel &amp;amp; WHM by reading our&amp;nbsp;&lt;a href="http://docs.cpanel.net/twiki/pub/AllDocumentation/WebHome/cPanelWHM_1128_SecurityTokensWhitePaper.pdf"&gt;Security Tokens white paper&lt;/a&gt;.)&lt;/p&gt; &lt;p&gt;In order for your custom script to work with cPanel &amp;amp; WHM, every URL involved needs to be compatible with the security token.&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Creating security token-compatible URLs&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Fortunately, it is very easy to do!&amp;nbsp;&lt;/p&gt; &lt;p&gt;The token is available in the environment variable 'cp_security_token'.&lt;/p&gt; &lt;p&gt;If security tokens are not in use, 'cp_security_token'&amp;nbsp;will be an empty string.&lt;/p&gt; &lt;p&gt;If security tokens are in use, 'cp_security_token'&amp;nbsp;will be, in terms of the above example: &lt;em&gt;/cpsessYYYYYYY&lt;/em&gt;&lt;/p&gt; &lt;p&gt;Note the&amp;nbsp;preceding&amp;nbsp;slash! &amp;nbsp;Since the variable has that slash, the examples will work whether cPanel &amp;amp; WHM has security tokens enabled or disabled.&lt;/p&gt; &lt;ul&gt;     &lt;li&gt;Here's how you'd use it in Perl code that calls one of our API URLS.&lt;br /&gt;     &lt;p&gt;Simply change this:&lt;/p&gt;     &lt;p&gt;&lt;code&gt;my $APIurl = &amp;quot;http://127.0.0.1:2087/xml-api/$url&amp;quot;;&lt;/code&gt;&lt;/p&gt;     &lt;p&gt;to this:&lt;/p&gt;     &lt;p&gt;&lt;code&gt;my $APIurl = &amp;quot;http://127.0.0.1:2087$ENV{'cp_security_token'}/xml-api/$url&amp;quot;;&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;     &lt;li&gt;Here's how you might use it in JavaScript for, say, an AJAX call.&lt;br /&gt;     &lt;p&gt;First, make it&amp;nbsp;available&amp;nbsp;to your JavaScript.&amp;nbsp;For example:&lt;/p&gt;     &lt;p&gt;&lt;code&gt;&lt;br /&gt;     &amp;nbsp; &amp;nbsp; print &amp;lt;&amp;lt;&amp;quot;END_SECURITY_TOKEN_JAVASCRIPT&amp;quot;;&amp;nbsp;&lt;br /&gt;     &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;     &amp;nbsp; &amp;nbsp; if ( !(&amp;quot;CPANEL&amp;quot; in window) ) CPANEL = {};&lt;br /&gt;     &amp;nbsp; &amp;nbsp; CPANEL.security_token = &amp;quot;$ENV{'cp_security_token'}&amp;quot;;&lt;br /&gt;     &amp;lt;/script&amp;gt;&lt;br /&gt;     END_SECURITY_TOKEN_JAVASCRIPT&lt;br /&gt;     &lt;/code&gt;&lt;br /&gt;     &lt;br /&gt;     Next, make your URLs compatible by changing this:&lt;/p&gt;&lt;/li&gt; &lt;/ul&gt; &lt;p style="margin-left: 40px; "&gt;&lt;code&gt;var ajaxURL = '/3rdparty/ZZZ/zzz.cgi';&lt;/code&gt;&lt;/p&gt; &lt;p style="margin-left: 40px; "&gt;to this:&lt;/p&gt; &lt;p style="margin-bottom: 0px; margin-left: 40px; "&gt;&lt;code&gt;var ajaxURL = CPANEL.security_token + '/3rdparty/ZZZ/zzz.cgi';&lt;/code&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0px; "&gt;&amp;nbsp;&lt;/p&gt;
        
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/xCRmtWKnLKU" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2012/01/making-your-script-work-with-security-tokens-in-cpanel-whm.html</feedburner:origLink></entry>

<entry>
    <title>LivePHP</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/IBe_K03Dqis/livephp.html" />
    <id>tag:www.cpanel.net,2011:/blog/integration//62.9858</id>

    <published>2011-10-05T18:44:11Z</published>
    <updated>2011-10-05T18:52:53Z</updated>

    <summary>Currently, if you want to write a Plugin for cPanel, you can write it in either LivePHP or cPPHP. Last year, we put some major effort into refactoring LivePHP. We added better debugging information, optimized the socket communication protocol, and...</summary>
    <author>
        <name>Matt Dees</name>
        
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;Currently, if you want to write a Plugin for cPanel, you can write it in either &lt;a href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/LivePHP"&gt;LivePHP&lt;/a&gt; or &lt;a href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/CpanelPhp"&gt;cPPHP&lt;/a&gt;.  Last year, we put some major effort into refactoring LivePHP. We added better debugging information, optimized the socket communication protocol, and added a few other tweaks.  After a year of vetting by external developers, I can say with confidence: &lt;i&gt;there is no longer any reason to use cPPHP when developing your application.&lt;/i&gt;&lt;/p&gt;
        &lt;p&gt;cPPHP is a system that requires cPanel to parse cPanel tags and then run the result through the PHP interpreter.  Alternately, it can run your code through a PHP interpreter, then parse out cPanel tags, depending on file extension.  This system has a few major disadvantages.&lt;/p&gt; &lt;p&gt;&amp;nbsp;Consider the following standard use case:&lt;/p&gt;  &lt;p&gt;&amp;nbsp;* Grab information from database&lt;br /&gt; * Perform API call based on information from database&lt;br /&gt; * Update database&lt;/p&gt;  &lt;p&gt;While in most ecosystems this is a very simple process, cPPHP does not make this easy because it required two separate pages.  Once cPanel switches from one parsing engine to the other (e.g. PHP to cptags) there is no way to switch back.  This means that to switch back, you have to grab the information from the database, POST that information to a second page, perform the API call, and then process it.  This is not an ideal scenario for any plugin and leads to some ugliness that the end user doesn't need to see.&lt;/p&gt;  &lt;p&gt;Another problem with cPPHP is that the templating engine uses a proprietary format.  While this format may work for our needs, it simply isn't reasonable to expect a third party developer to write the following code to make &amp;amp; display an API call:&lt;/p&gt;  &lt;p&gt;&lt;code&gt;&amp;lt;?cp StatsBar::stat([tr class=&amp;quot;row-%&amp;quot;][td class=&amp;quot;stats_left&amp;quot;]%[/td][td class=&amp;quot;stats_right&amp;quot;] % / %[br /][div class=&amp;quot;stats_progress_bar&amp;quot;][div class=&amp;quot;cpanel_widget_progress_bar_percent&amp;quot; style=&amp;quot;display\{colon}none&amp;quot;]%[/div][/div][/td][/tr],rowtype,item,count,max,percent) display=diskusage|bandwidthusage,infinitylang=true,rowcounter=mainstats &amp;gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;At least without wanting to tear their hair from their heads.&lt;/p&gt;  &lt;p&gt;LiveAPI (aka LivePHP) resolves all of these problems.&lt;/p&gt;  &lt;p&gt;LivePHP provides an object for interfacing with LiveAPI.  This API is a heavily optimized version of our XML API's cpanel call.  LiveAPI works by having an object, abstracted into a class, you can use to access cPanel's API over a socket connection.  When a LivePHP process is launched, cPanel forks itself into a special &amp;quot;LiveAPI&amp;quot; mode that acts as the socket server while the PHP script acts as a client sending commands to the server.&lt;/p&gt;  &lt;p&gt;This solves both of the aforementioned problems.  For the first case, when we wanted to grab information from a database, the interaction becomes simple. We begin by calling the database object, then call the LivePHP object, and finally call the database class again.&lt;/p&gt;  &lt;p&gt;When calling API2, LivePHP will return the same data that's returned by the actual API call, wrapped in some metadata. All of this data is in the same format that is used by our XML API cpanel call &lt;link /&gt;).  This allows you to format the data using whichever templating engine you prefer.  This is a much cleaner method than the old cPPHP system.  API1 calls return the same data structure through LiveAPI. The main difference is that the node containing the response data will contain a string rather than an array.&lt;/p&gt;  &lt;p&gt;One of the major misconceptions I hear about LivePHP is that it can't be branded.  While this was true 2 years ago, before we optimized the system, it isn't an issue now.  The problem with branding used to be that calls tended to involve making an API call that had to make an API call.  This caused problems with the serialization method we used, resulting in quite a few ugly nested cpanelresult data structures.&lt;/p&gt;  &lt;p&gt;These days, it's quite simple to brand LivePHP.  For example, the following code will result in a branded LivePHP page that you can work with:&amp;nbsp;&lt;/p&gt;   &lt;p&gt;&lt;code&gt;&amp;lt;?php&lt;br /&gt; include(&amp;quot;/usr/local/cpanel/php/cpanel.php&amp;quot;);&lt;br /&gt; $cpanel = new CPANEL();&lt;br /&gt; $res = $cpanel-&amp;gt;api1('Branding', 'include', array('stdheader.html') );&lt;br /&gt; print $res['cpanelresult']['data']['result'];&lt;br /&gt; ?&amp;gt;&lt;br /&gt; &amp;lt;div class=&amp;quot;body-content&amp;quot;&amp;gt;&lt;br /&gt; Hello World!&lt;br /&gt; &amp;lt;/div&amp;gt;&lt;br /&gt; &amp;lt;?php&lt;br /&gt; $res = $cpanel-&amp;gt;api1('Branding', 'include', array('stdfooter.html') );&lt;br /&gt; print $res['cpanelresult']['data']['result'];&lt;br /&gt; $cpanel-&amp;gt;end();&lt;br /&gt;&lt;/code&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;As you can see, LiveAPI is a much more straightforward approach to the cPTags system.  We have found LivePHP to be a much more robust system for developing cPanel plugins in PHP.&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/IBe_K03Dqis" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2011/10/livephp.html</feedburner:origLink></entry>

<entry>
    <title>Why you should use RPMs to distribute your application</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/s2MnG4LunKw/why-you-should-use-rpms-to-distribute-your-application.html" />
    <id>tag:www.cpanel.net,2011:/blog/integration//62.9838</id>

    <published>2011-09-14T18:02:21Z</published>
    <updated>2011-09-14T18:05:36Z</updated>

    <summary><![CDATA[As a developer, it is important to understand who you are developing for. When developing an application for cPanel &amp; WHM servers, there are 5 potential customer profiles to be aware of:&nbsp;Data centers&nbsp;Developers&nbsp;Website owners&nbsp;System administrators&nbsp;Hosting providers&nbsp;Understanding these profiles will help...]]></summary>
    <author>
        <name>Matt Dees</name>
        
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="integrationdistribution" label="integration distribution" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;As a developer, it is important to understand who you are developing for. When developing an application for cPanel &amp;amp; WHM servers, there are 5 potential customer profiles to be aware of:&amp;nbsp;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Data centers&amp;nbsp;&lt;/li&gt;&lt;li&gt;Developers&amp;nbsp;&lt;/li&gt;&lt;li&gt;Website owners&amp;nbsp;&lt;/li&gt;&lt;li&gt;System administrators&amp;nbsp;&lt;/li&gt;&lt;li&gt;Hosting providers&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Understanding these profiles will help you scope and define a project.&amp;nbsp;&lt;/p&gt;&lt;p&gt;In this article, we will focus on Data centers and the various problems you might encounter when working with them.&amp;nbsp;&lt;/p&gt;
        &lt;p&gt;&amp;nbsp;Data centers make up a nice segment of the cPanel &amp;amp; WHM customer base. They include the likes of SoftLayer, InMotion Hosting, Knownhost, SingleHop, as well as a long list of our worldwide hosting providers. These organizations have spent a considerable amount of time automating server, cloud and VPS deployments. As an application developer, being part of the deployment process is important.&lt;/p&gt;&lt;p&gt;Automated server deployments come in many shapes and sizes, but the important thing to remember is to avoid having a manual installation step as part of the deployment process. Imagine deploying thousands of servers each month and having to log into each in order run a manual installation at the end. This is a real problem for streamlined product delivery. Overcoming this problem can help you, the application developer, gain access to a core distribution channel.&amp;nbsp;&lt;/p&gt;&lt;p&gt;The ideal scenario is getting your application integrated with the deployment, or ordering, process. By this I mean when a potential data center customer is navigating the ordering system, your application becomes a selectable configuration option included with the server purchase, and it is automatically installed and configured. Without automation capability you will have to overcome the challenge of convincing the data center to manually install and configure your application, for each customer who requests it. The closer you can get to achieving automated deployments, the more interested data centers will be in your product.&lt;/p&gt;&lt;p&gt;One way to resolve this problem is to distribute your application as an RPM. An RPM allows the data center to automate installation and configuration at deployment time, without investing resources in working with a variety of third-party applications, each with their own peculiar method of installation and configuration. Decreasing the amount of work involved for a potential customer or client will increase the likelihood of their being willing to distribute your application.&lt;/p&gt;&lt;p&gt;There are other advantages, as well as disadvantages, to using RPMs for your application installation. RPMs are a standardized package format on the Linux platform. This means that Linux-based cPanel &amp;amp; WHM servers come standard with tools to manage RPMs from the command line. Such systems also provide a means of integrating custom RPMs at operating system installation time &amp;mdash; for example, using kickstart profiles.&lt;/p&gt;&lt;p&gt;A disadvantage of using RPM is it locks you out of the small part of the cPanel &amp;amp; WHM server base that does not use an RPM package format. While that portion of the server base is expected to diminish over time, excluding yourself from some customers is something to consider.&lt;/p&gt;&lt;p&gt;There is more work involved in packaging your application as an RPM than as a tarball. There are numerous resources available to help you learn and overcome these challenges, such as the book &lt;a href="http://www.rpm.org/max-rpm/"&gt;Maximum RPM&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;Once in the deployment process, an issue can arise if your application is installed too soon in the process. For example, if your application requires the basic cPanel &amp;amp; WHM setup to first be performed, there may be insufficient data in /etc/wwwacct.conf for your application&amp;rsquo;s needs. A resolution for this problem is to create a &lt;a href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/CreatingWhmPlugins"&gt;WHM Plugin&lt;/a&gt; that handles the configuration of your application. This way, your configuration step can be performed after the WHM Initial Setup Wizard has been run.&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/s2MnG4LunKw" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2011/09/why-you-should-use-rpms-to-distribute-your-application.html</feedburner:origLink></entry>

<entry>
    <title>Spotlight On: Creating DNS Modules</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/jd4bVtFRh7g/spotlight-on-creating-dns-modules.html" />
    <id>tag:www.cpanel.net,2011:/blog/integration//62.9814</id>

    <published>2011-08-24T15:59:04Z</published>
    <updated>2011-08-24T16:00:22Z</updated>

    <summary><![CDATA[In cPanel &amp; WHM 11.30, we added the ability to add 3rd party systems to your DNS cluster. With this ability, we added functionality that allows you to create dnsadmin plugins. You can use these plugins to control and configure...]]></summary>
    <author>
        <name>Matt Dees</name>
        
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="dnsdnsadminintegration" label="dns dnsadmin integration" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p class="p4"&gt;In cPanel &amp;amp; WHM 11.30, we added the ability to add 3rd party systems to your DNS cluster. With this ability, we added functionality that allows you to create dnsadmin plugins. You can use these plugins to control and configure remote nodes of your DNS cluster. &amp;nbsp;The plugins themselves consist of a few Perl modules. Creating a dnsadmin plugin will require some familiarity with Perl.&lt;/p&gt;&lt;p class="p4"&gt;To begin building a dnsadmin plugin, please &lt;a href="http://docs.cpanel.net/twiki/bin/view/SoftwareDevelopmentKit/PluggableDnsAdminModules"&gt;read the documentation&lt;/a&gt;.&lt;/p&gt;
        
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/jd4bVtFRh7g" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2011/08/spotlight-on-creating-dns-modules.html</feedburner:origLink></entry>

<entry>
    <title>Enkompass 2.0, now with new integration features...</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/eii_5hmt_Kk/enkompass-20-now-with-new-integration-features.html" />
    <id>tag:www.cpanel.net,2011:/blog/integration//62.9746</id>

    <published>2011-06-17T20:54:13Z</published>
    <updated>2011-06-18T02:42:21Z</updated>

    <summary>Enkompass 2.0, now with new integration features... XMLAPI, Hooks, Remote Access Keys.</summary>
    <author>
        <name>Tom Green</name>
        <uri>http://www.cpanel.net/</uri>
    </author>
    
        <category term="Enkompass" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;h2&gt;Announcement:&lt;/h2&gt;

&lt;p&gt;With the release of Enkompass 2.0 on Tuesday, several exciting new integration features are now available.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;XML API for Enkompass&lt;/strong&gt; - Crafted to be familiar to our existing cPanel XML API users. We provide comparable functionality.  Extensions to the API for the Enkompass specific functionally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;XML API Developer Page&lt;/strong&gt; - Try out the API calls from the developer page access in System Administration Interface (SAI) by logging in with your account and using this link:&lt;/p&gt;

&lt;p&gt;http://&amp;lt;your Enkompass server&amp;gt;:2086/API/xml-api/&lt;/p&gt;

&lt;p&gt;These developer pages include complete self-documentation for this API as well as test pages for each available function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Remote Access Keys&lt;/strong&gt; - A new interface for configuring remote access keys for XML API authentication have been added to the System Administration Interface.  To access this tool, type "remote access" in the find box of the System Administration Interface.  Remote access keys can be setup for any account in Enkompass.  These keys have an added security feature, you can set a start and end date for the key allowing you to provide limited time access to the XML API.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hooks for the Enkompass API&lt;/strong&gt; - We designed a framework for intercepting pre and post API calls to the Enkompass Core services.  The framework we developed comes with two out of the box solutions: Command Hooks and URL Hooks. If these implementations do not meet your needs, the framework was designed with extensibility in mind.  For more information check out the documentation at:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://go.cpanel.net/enkwcfhooks"&gt;http://go.cPanel.net/enkwcfhooks&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;Coming Soon:&lt;/h1&gt;

&lt;p&gt;The Enkompass team is hard at work building the Addin interface for the Enkompass applications. With the Addin system, third party tools designed to work with Enkompass can be added to the System Administration Interface, Web Site Owner Interface, and Mail Owner Interface.  I'll have more information on this soon.&lt;/p&gt;

        

    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/eii_5hmt_Kk" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2011/06/enkompass-20-now-with-new-integration-features.html</feedburner:origLink></entry>

<entry>
    <title>BETA Release of PublicAPI PHP, the cPanel PHP Library, and cPanel PEAR</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/WCOmCu549ak/beta-release-of-publicapi-php-the-cpanel-php-library-and-cpanel-pear.html" />
    <id>tag:www.cpanel.net,2011:/blog/integration//62.9642</id>

    <published>2011-04-08T13:52:19Z</published>
    <updated>2011-04-20T19:57:42Z</updated>

    <summary>We are pleased to announce that our PublicAPI PHP client is ready! This API query client is the sibling to Cpanel::PublicAPI that was announced last month. You can download the PublicAPI PHP client at our github repository as well as...</summary>
    <author>
        <name>David N.</name>
        <uri>http://www.cpanel.net</uri>
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;We are pleased to announce that our PublicAPI PHP client is ready!  This API query client is the sibling to Cpanel::PublicAPI that was &lt;a href="http://www.cpanel.net/blog/integration/2011/03/cpanelpublicapi.html"&gt;announced&lt;/a&gt; last month.&lt;/p&gt;

&lt;p&gt;You can download the PublicAPI PHP client at our &lt;a href="http://github.com/CpanelInc/publicapi-php"&gt;github repository&lt;/a&gt; as well as the new &lt;a href="http://cpanelinc.github.com/pear/"&gt;cPanel PEAR channel&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;One of the key distinctions of the PublicAPI PHP client class is that it's distributed as part of the cPanel PHP Library. The cPanel PHP library is a collection of PHP classes for interfacing with cPanel systems.&lt;/p&gt;

        &lt;p&gt;When we began working on the PublicAPI PHP client, we had three goals in mind:    &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a PHP-based API client for developers that adheres to the PublicAPI interface&lt;/li&gt;
&lt;li&gt;Provide compatibility with existing scripts that use the &lt;a href="http://github.com/CpanelInc/xmlapi-php"&gt;XML-API client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Provide support for LivePHP&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because LivePHP and XML-API work on two different query mechanisms (file sockets and HTTP, respectively) it was immediately apparent that the code responsible for transmitting and receiving the server response would need to be abstracted.&lt;/p&gt;

&lt;p&gt;We also had to consider that the Public API, XML-API, and LivePHP interfaces defined their own set of query methods. This meant that any instance of the client object would need to be smart enough to know about each interfaces' methods, understand their context, and validate each methods' arguments.&lt;/p&gt;

&lt;p&gt;The most direct solution would have been to lump all of the query calls together in one class.    However, this solution would have put us back to square one if a new interface or cPanel service were to be introduced.   Instead, we made a series of inherited models that would function 'under the hood,' while the 'top' would be a customizable  object that could be tailored as necessary.&lt;/p&gt;

&lt;p&gt;Long story short, about 2000 lines into it, we realized that this was no longer a client but a full-fledged library &amp;mdash; a group of components that are (mostly) decoupled. The result being that any one or more components can be used to build an entirely different client or application. Thus, the cPanel PHP Library was born.&lt;/p&gt;

&lt;p&gt;The README.markdown file in the repo (also in the PEAR package) offers a good summarization of what is included in the distribution as well as an introduction to the cPanel PHP Library and PublicAPI. Please take the time to read that file and checkout the &lt;em&gt;Examples/&lt;/em&gt; directory in the distribution.  &lt;/p&gt;

&lt;p&gt;As an example, here is a little script I wrote while answering a quick forum post related to Analog Stats queries via API1 and API2:   &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;?php
require_once 'Cpanel/Util/Autoload.php';
$hash = file_get_contents('/root/.accesshash');
$cfg = array(
    'service' =&amp;gt; array(
        'whm' =&amp;gt; array(
            'host'=&amp;gt;'127.0.0.1',
            'user'=&amp;gt;'root',
            'hash'=&amp;gt;$hash,
        ),
    ),
);

$cp = Cpanel_PublicAPI::getInstance();
// just a quick poll of what cPanel version I'm running
$response = $cp-&amp;gt;whm_api('version');
echo "Version: {$response-&amp;gt;version}\n";

// Test the output of API2 Stats::listanalog
//   call should produce a list of domains that have stats
$mf = array(
    'module' =&amp;gt; 'Stats',
    'function' =&amp;gt; 'listanalog',
    'user' =&amp;gt; 'cppirum',
);

$api2_list = $cp-&amp;gt;cpanel_api2_request('whostmgr', $mf);

echo "List from API2 Stats::listanalog\n";

/**
 * For debugging I could just dump the "array" format
 *  var_dump ($api2_list-&amp;gt;getResponse('array'));
 *
 * But I'd rather have a nice loop on the object
 */
foreach ( $api2_list-&amp;gt;cpanelresult-&amp;gt;data as $stat_holder) {
    echo "\tDomain '{$stat_holder-&amp;gt;domain}' has stats.\n";
}
echo "\n";

// Same thing here, only we'll look at API1 Stats::analoglist, which generates HTML

$mf = array(
    'module' =&amp;gt; 'Stats',
    'function' =&amp;gt; 'analoglist',
    'user'=&amp;gt;'cppirum',
);
// This API call requires a domain
$args = array('pear.cppirum.net');

$api1_list = $cp-&amp;gt;cpanel_api1_request('whostmgr', $mf, $args);


echo "list from API1 Stats::analoglist\n";
$html = $api1_list-&amp;gt;data-&amp;gt;result;
$xml = '&amp;lt;?xml version="1.0"?&amp;gt;&amp;lt;root&amp;gt;' . trim($html) . '&amp;lt;/root&amp;gt;';
$sxml = simplexml_load_string($xml);
foreach ($sxml-&amp;gt;a as $url) {
    $attributes = $url-&amp;gt;attributes();
    echo "\tStats for {$url} can be found at 'https://{$args[0]}:2083{$attributes['href']}'.\n";
}
echo "\n";
?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As you can see, I used the the whm_api(), cpanel_api1_request(), and cpanel_api2_request() query methods of the PublicAPI interface.  The arguments for each of those methods are the same as in the Perl PublicAPI client.&lt;/p&gt;

&lt;p&gt;Download it and give it whirl.  This is BETA software so you may encounter some quirky behavior. If you experience any problems, please let use know by using the &lt;a href="http://github.com/CpanelInc/publicapi-php/issues"&gt;github issue tracker&lt;/a&gt;.  There are several features within the library that we hope to refine, as it matures to a STABLE release over the next several months.&lt;/p&gt;

&lt;p&gt;In the coming days, we hope to provide more detailed documentation on &lt;a href="http://sdk.cpanel.net"&gt;sdk.cpanel.net&lt;/a&gt; concerning PublicAPI (Perl and PHP) and the cPanel PHP library.  In the meantime, you can checkout the POD (Perl) and DocBlock (PHP) documentation that's included in the code.&lt;/p&gt;

&lt;p&gt;Regards &amp;amp; Happy Coding!&lt;/p&gt;

    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/WCOmCu549ak" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2011/04/beta-release-of-publicapi-php-the-cpanel-php-library-and-cpanel-pear.html</feedburner:origLink></entry>

<entry>
    <title>Introduction to cPanel &amp; WHM APIs</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/fixCcP1bnPU/introduction-to-cpanel-whm-apis.html" />
    <id>tag:www.cpanel.net,2011:/blog/integration//62.9558</id>

    <published>2011-03-25T11:45:00Z</published>
    <updated>2011-03-25T11:45:49Z</updated>

    <summary><![CDATA[Application Programming Interfaces (APIs) are fundamental to the cPanel &amp; WHM product. APIs allow developers to perform actions (functions) that source and manipulate data related to cPanel accounts and system utilities. Our APIs are used by the cPanel developers when...]]></summary>
    <author>
        <name>David N.</name>
        <uri>http://www.cpanel.net</uri>
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="api1api2xmlapi" label="API1 API2 XMLAPI" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;Application Programming Interfaces (APIs) are fundamental to the cPanel &amp;amp; WHM product.  APIs allow developers to perform actions (functions) that source and manipulate data related to cPanel accounts and system utilities.  Our APIs are used by the cPanel developers when designing new features and interfaces but are also available to 3rd-party developers.  In this post, we'll review the various APIs associated with cPanel and WHM and how you can use them in your own development.&lt;/p&gt;

        &lt;p&gt;There are two APIs that affect the cPanel user space:  &lt;a href="http://docs.cpanel.net/twiki/bin/view/DeveloperResources/ApiBasics/WebHome" target="_blank" &gt;API1 and API2&lt;/a&gt;.  These APIs are used throughout the cPanel interface.  In fact, every cPanel interface (i.e., all themes, branding, and pages served in a descendant direct of $server/base/frontend/ ) use these APIs alone to present and alter the end-user's environment.&lt;/p&gt;

&lt;p&gt;API1 and API2 each have their own set of modules*.  Within each module, there is a set functions.  For instance, API2's 'Email' module contains a function called 'listpopswithdisk' that will list all the details for all of the pop email accounts associated with a cPanel username.  API1 modules are listed &lt;a href="http://docs.cpanel.net/twiki/bin/view/ApiDocs/Api1/WebHome" target="_blank" &gt;here&lt;/a&gt; and API2 modules are listed &lt;a href="http://docs.cpanel.net/twiki/bin/view/ApiDocs/Api2/WebHome" target="_blank" &gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There are two common, false assumptions about API1 and API2 that confuse many newcomers to cPanel development.  The first common misconception is that API1 begat API2.  API1 and API2 are not ancestrally related.  It is true that API1 was the first publicly available API in cPanel;however, development on API2 did not occur after API1. Both versions of the API were concurrently developed for several years.  API1 is considered fully matured at this point in time.  Active development has stopped, but API1 is maintained for bugs, security, and (as necessary) forward compatibility.  The second common misconception is is that all API1 modules (and their functions) are available in API2.  Sometimes, I hear the opposite, that all API2 module and functions are available in API1.  Neither of these statements are true.  Both API1 and API2 have their particular modules (and their functions) due, in large part, to the organic growth of the cPanel &amp;amp; WHM product.  It is not uncommon for a module of the same name, present in both API1 and API2, to have different functions.  It most cases, if a particular function exists in both API1 and API2, we recommend using API2.&lt;/p&gt;

&lt;p&gt;API1 was originally designed to be a front-end-only API for use in cPanel pages.  Because of this, API1 calls print their output directly to STDOUT.  In various parts of the product, that output is suppressed or redirected due to the context of its usage. However, this is the exception to the rule and wouldn't occur within a cPanel end-user interface.  Since API1 was designed for use by a browsable interface, it is not out of the ordinary for an API1 function to generate a snippet of HTML**.  API2, on the other hand, always returns a Perl hash structure.  While this makes getting raw data much easier, it adds a layer of complexity for front end developers. (But it's so much more &lt;a href="http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/UsingCpttTags" target="_blank"&gt;flexible&lt;/a&gt;! Which is why we prefer API2 functions where possible).  Both API1 and API2 calls can be accessed within cPanel pages and their front end usage is described &lt;a href="http://docs.cpanel.net/twiki/bin/view/DeveloperResources/ApiBasics/CallingApiOne" target="_blank"&gt;here&lt;/a&gt; and &lt;a href="http://docs.cpanel.net/twiki/bin/view/DeveloperResources/ApiBasics/CallingApiTwo" target="_blank"&gt;here&lt;/a&gt;, respectively.&lt;/p&gt;

&lt;p&gt;The &lt;a href="http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/XmlApi" target="_blank"&gt;XML-API&lt;/a&gt; can perform actions that are found within the WHM interface.  The XML-API was written specifically for remote interactions with cPanel &amp;amp; WHM.  That means that a developer must make an HTTP query to invoke the desired function.  While the XML-API covers a lot of functionality, the breadth of utility does not cover as much ground as API1 and API2. so the function sets aren't compartmentalized into modules.  However, in our &lt;a href="http://docs.cpanel.net/twiki/bin/vief/AllDocumentation/AutomationIntegration/XmlApi#Functions" target="_blank"&gt;documentation&lt;/a&gt;, you will find those functions within logical groupings, like "Account functions" and "SSL functions."&lt;/p&gt;

&lt;p&gt;The XML-API, like the name suggests, will return XML formatted results.  We also offer a JSON version.  The interface (aka, HTTP request format) is the same, it's just a different path in the URL.  Unconventionally, it is completely commonplace to see both the XML and the JSON response/query types referred to as XML-API, despite the obvious discrepancy in the API's name.&lt;/p&gt;

&lt;p&gt;As it was mentioned earlier, the XML-API can source and manipulate data similar to actions found in the WHM interface.  Informally, we call these XML-API functions "native" since they are built right into the XML-API query parser.  These native functions are performed as the authenticated, privileged WHM user, namely "root" or a reseller account.  This is an important distinction since the XML-API can also perform cPanel actions as a privileged user or end-user!  The XML-API can be used as a proxy for API1 and API2 functions.  This proxy style query parser is available to all users.  If a privileged user makes an API1 or API2 call via the XML-API on either the WHM or cPanel ports, the action will be performed as the user they specify, provided they clear any relevant ACL checks.  If a cPanel end-user makes an API1 or API2 call, authenticated as themselves, via the XML-API on a cPanel port, it will perform the action as if from a cPanel page.  Details about invoking the XML-API are &lt;a href="http://docs.cpanel.net/twiki/bin/vief/AllDocumentation/AutomationIntegration/XmlApi#Formatting and using API calls" target="_blank"&gt;here&lt;/a&gt;.  Specific information about calling API1 and API2 functions via the XML-API can be found &lt;a href="http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/CallingAPIFunctions" target="_blank"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;There is one other API currently available to developers that should be mentioned.  The Manage2 API provides the utility for managing cPanel licenses. The Manage2 API is primarily for those interested in creating a custom interface for viewing and updating their cPanel licenses.  Being an HTTP query, these functions are queried in a similar fashion to the XML-API.  The response can be formatted in XML, JSON, or YAML.  The Manage2 API is documented &lt;a href="http://docs.cpanel.net/twiki/bin/view/ManageTwo/Manage2Api" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In case you missed Matt Dees' &lt;a href="http://www.cpanel.net/blog/integration/2011/03/cpanelpublicapi.html" target="_blank"&gt;post&lt;/a&gt; from earlier this month, he announced the official release of cPanel::PublicAPI. It's available for download on &lt;a href="http://search.cpan.org/~mattdees/cPanel-PublicAPI-1.000/lib/cPanel/PublicAPI.pod" target="_blank"&gt;CPAN&lt;/a&gt; and our &lt;a href="https://github.com/CpanelInc/cPanel-PublicAPI" target="_blank"&gt;Github repository&lt;/a&gt;.  This is an excellent package for querying these APIs (and some other stuff too) in Perl.  For PHP folk, we have the XML-API PHP client class, available on our &lt;a href="https://github.com/CpanelInc/xmlapi-php" target="_blank"&gt;Github repository&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There is always good information and helpful people in the &lt;a href="http://forums.cpanel.net/developer-discussions.html" target="_blank"&gt;Developer Discussions&lt;/a&gt; forum.  Please don't hesitate to ask questions or make comments. We really appreciate the input as we review our previous implementations and design new ones.  This year promises to be filled with lots of new integration utilities and functionality, so stay tuned!&lt;/p&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div style="font-size:smaller"&gt;&lt;p&gt;* The API1 and API2 modules are called "modules" because of their correlation to the "Cpanel" Perl module namespace.  However, these API calls actually pass through a request parser before action is delegated to the end Perl subroutine.  So, there wouldn't be a one-to-one relationship with the API module/functions and the Perl module/subroutines.&lt;/p&gt;
&lt;p&gt;** If a particular API1 call renders HTML, it is likely to do the same in the body of an XML-API request too.  Since HTML is not XML, but the entire response will likely be treated as such by an XML parser, be careful as you might not receive a well-formed response.&lt;/p&gt;&lt;/div&gt;

    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/fixCcP1bnPU" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2011/03/introduction-to-cpanel-whm-apis.html</feedburner:origLink></entry>

<entry>
    <title>cPanel::PublicAPI</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/Q0NPaa4ZEoo/cpanelpublicapi.html" />
    <id>tag:www.cpanel.net,2011:/blog/integration//62.9074</id>

    <published>2011-03-07T17:42:06Z</published>
    <updated>2011-04-25T16:59:44Z</updated>

    <summary><![CDATA[ p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px} li.li1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica} span.s1 {letter-spacing: 0.0px} &nbsp;Today I posted cPanel::PublicAPI to github. &amp;nbsp;This...]]></summary>
    <author>
        <name>Matt Dees</name>
        
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="cpanelpublicapiapi1api2xmlapiperl" label="cpanel publicapi api1 api2 xml-api perl" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt; &lt;meta http-equiv="Content-Style-Type" content="text/css"&gt; &lt;title&gt;&lt;/title&gt; &lt;meta name="Generator" content="Cocoa HTML Writer"&gt; &lt;meta name="CocoaVersion" content="1038.35"&gt; &lt;style type="text/css"&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
li.li1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
span.s1 {letter-spacing: 0.0px}
&lt;/style&gt;    &lt;/meta&gt;&lt;/meta&gt;&lt;/meta&gt;&lt;/meta&gt;&lt;/p&gt; &lt;p class="p1"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="p1"&gt;Today I posted cPanel::PublicAPI to github. &amp;amp;nbsp;This is a set of perl modules that allows for easy access into cPanel's APIs from a simple object interface. &amp;amp;nbsp;This module offers several great features:&lt;/p&gt;&lt;p class="p1"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="p1"&gt;* &amp;nbsp;Auto-detection of credentials (when available)&lt;/p&gt;&lt;p class="p1"&gt;* &amp;nbsp;Support for cPanel's DNS Clustering API&lt;/p&gt;&lt;p class="p1"&gt;* &amp;nbsp;Support for: cPanel, WHM, webmail and non-cPanel services.&lt;/p&gt;&lt;p class="p1"&gt;* &amp;nbsp;Minimal dependencies&lt;/p&gt;&lt;p class="p1"&gt;* &amp;nbsp;BSD Licensed&lt;/p&gt;&lt;p class="p1"&gt;&amp;nbsp;&lt;/p&gt;&lt;p class="p1"&gt;To get started, you can install cPanel::PublicAPI via CPAN the source is also available on our&amp;nbsp;&lt;a href="https://github.com/CpanelInc/cPanel-PublicAPI"&gt;github repository&lt;/a&gt;&amp;nbsp;if you wish to submit patches/changes. I strongly suggest reading the&amp;nbsp;&lt;a href="http://search.cpan.org/~mattdees/cPanel-PublicAPI-1.002/lib/cPanel/PublicAPI.pod"&gt;documentation on CPAN&lt;/a&gt; to get started.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;
        &lt;p&gt;The following is an example of how to query the XML-API's listaccts() call using PublicAPI (on a cPanel server, running as root, and an accesshash exists):&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;#!/usr/bin/perl&lt;br /&gt;
use cPanel::PublicAPI ();&lt;br /&gt;
use Data::Dumper;&lt;br /&gt;
my $pubapi = cPanel::PublicAPI-&amp;gt;new();&lt;br /&gt;
print Dumper $pubapi-&amp;gt;whm_api('listaccts');&lt;/code&gt;&lt;br /&gt;
To query a cpanel account with API2 while authenticated as root, you would do something like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;#!/usr/bin/perl&lt;br /&gt;
use&amp;nbsp;cPanel::PublicAPI&amp;nbsp;();&lt;br /&gt;
use&amp;nbsp;Data::Dumper&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;();&lt;br /&gt;
my&amp;nbsp;$pubapi&amp;nbsp;=&amp;nbsp;cPanel::PublicAPI-&amp;gt;new();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;#&amp;nbsp;Create&amp;nbsp;email&amp;nbsp;account&lt;br /&gt;
print&amp;nbsp;Dumper&amp;nbsp;$pubapi-&amp;gt;cpanel_api2_request(&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'whostmgr',&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'module'&amp;nbsp;=&amp;gt;&amp;nbsp;'Email',&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'func'&amp;nbsp;=&amp;gt;&amp;nbsp;'addpop',&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'user'&amp;nbsp;=&amp;gt;&amp;nbsp;'someuser',&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;},&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'domain'&amp;nbsp;=&amp;gt;&amp;nbsp;'myawesomedomain.com',&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'email'&amp;nbsp;=&amp;gt;&amp;nbsp;'localuser',&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'password'&amp;nbsp;=&amp;gt;&amp;nbsp;'AS(d0m9d0sad12ea!s',&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'quota'&amp;nbsp;=&amp;gt;&amp;nbsp;42,&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
);&lt;br /&gt;
&lt;/code&gt; &lt;br /&gt;
&lt;br /&gt;
You may have noticed that you have to specify the service as the first parameter. It is important to note that even though you may be calling the cpanel API, if you are root or a reseller querying an account that is not the reseller account itself, you will still need to query the whostmgr service.  This is because if you authenticate against the cpanel service, you will be querying your user, no mater which user you specify in the &amp;ldquo;config&amp;rdquo; hash.&lt;br /&gt;
&lt;br /&gt;
If you don't want cPanel::PublicAPI to auto-detect credentials, you can pass in the user and pass:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;my $pubapi = cPanel::PublicAPI-&amp;gt;new( 'user' =&amp;gt; 'someuser', 'pass' =&amp;gt; 'sdfkklkasf' );&lt;/code&gt; &lt;br /&gt;
Or you can specify an access hash:&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;my $pubapi = cPanel::PublicAPI-&amp;gt;new( 'user' =&amp;gt; 'someuser', 'accesshash' =&amp;gt; $contents_of_homedir_slash_dot_acesshash );&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
There are tons of other features within this module, I suggest starting out with the POD documentation for cPanel::PublicAPI and going from there.  If you have any further questions, please post on our dev forums and we will be happy to help you.&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/Q0NPaa4ZEoo" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2011/03/cpanelpublicapi.html</feedburner:origLink></entry>

<entry>
    <title>cPanel 11.30</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/ggkgBrfijmg/cpanel-1130-6.html" />
    <id>tag:www.cpanel.net,2011:/blog/integration//62.9022</id>

    <published>2011-02-25T21:48:26Z</published>
    <updated>2011-02-26T22:18:46Z</updated>

    <summary><![CDATA[The release of cPanel &amp; WHM version 11.30 in EDGE is right around the corner. With this release we have made numerous changes, added a few features and fixed some bugs. Predominantly, these changes can be encompassed in a few...]]></summary>
    <author>
        <name>Matt Dees</name>
        
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p class="p2"&gt;&lt;span class="s1"&gt;The release of cPanel &amp;amp; WHM version 11.30 in EDGE is right around the corner. With this release we have made numerous changes, added a few features and fixed some bugs. Predominantly, these changes can be encompassed in a few bullet points:&lt;/span&gt;&amp;nbsp;&lt;/p&gt;   &lt;ul&gt; &lt;li class="li3"&gt;&lt;span class="s1"&gt;Complete rewrite of update system&lt;/span&gt;&lt;/li&gt; &lt;li class="li3"&gt;&lt;span class="s1"&gt;Addition of Cpanel::PublicAPI&lt;/span&gt;&lt;/li&gt; &lt;li class="li3"&gt;&lt;span class="s1"&gt;Removal of Legacy Themes&lt;/span&gt;&lt;/li&gt; &lt;li class="li3"&gt;&lt;span class="s1"&gt;Several new API calls&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt;  &lt;p class="p3"&gt;&lt;span class="s1"&gt;Though each of these changes may seem small when listed as bullet points, there are a few details that you, as someone who customizes or integrates with cPanel &amp;amp; WHM should be aware of.&lt;/span&gt;&lt;/p&gt;
        &lt;p&gt;&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: Helvetica; "&gt;&lt;b&gt;Update System&lt;/b&gt;&lt;/span&gt;&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;&lt;meta http-equiv="Content-Style-Type" content="text/css"&gt;&lt;title&gt;&lt;/title&gt;&lt;meta name="Generator" content="Cocoa HTML Writer"&gt;&lt;meta name="CocoaVersion" content="1038.35"&gt;&lt;style type="text/css"&gt;
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
li.li1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
span.s1 {letter-spacing: 0.0px}
span.s2 {text-decoration: underline ; letter-spacing: 0.0px}
span.s3 {text-decoration: underline ; letter-spacing: 0.0px color: #0d0caa}
&lt;/style&gt;&lt;/meta&gt;&lt;/meta&gt;&lt;/meta&gt;&lt;/meta&gt;&lt;/p&gt;&lt;p class="p1"&gt;&lt;span class="s1"&gt;The rewrite of the cPanel &amp;amp; WHM update system (or upcp) has been a major project of ours for quite some time now.&amp;nbsp; There are numerous improvements in this version, including the addition of long term support, better logging and many other benefits for both users and developers.&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;Some parts of this change will have a major impact on developers.&amp;nbsp; &lt;/span&gt;&lt;span class="s2"&gt;Most importantly, /scripts will be relocated to /usr/local/cpanel/scripts&lt;/span&gt;&lt;span class="s1"&gt;.&amp;nbsp; When this happens, we will attempt to migrate the data in /scripts to /usr/local/cpanel/scripts and then backup /scripts and symlink /usr/local/cpanel/scripts to /scripts.&amp;nbsp; There are a couple of scenarios where this will not happen:&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;ul&gt; &lt;li class="li1"&gt;&lt;span class="s1"&gt;if /scripts contains more than 5,000 files&lt;/span&gt;&lt;/li&gt; &lt;li class="li1"&gt;&lt;span class="s1"&gt;if the size of /scripts is more than 100mB&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;In this scenario, an email should be sent to the user asking them to resolve the issue. The user should also be updated to the latest version of 11.28 (rather than 11.30).&amp;nbsp; In a standard cPanel install, or even a heavily customized one, this should not be an issue.&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;Another major part of this change is the reworking of how RPMs are versioned with the product.&amp;nbsp; Previously, an RPM has been tied to a specific tier. For example, exim may have a different version for EDGE and CURRENT.&amp;nbsp; Now, the RPM version is tied to the version of the product. Thus,if you are running 11.30.3 in the EDGE tier or CURRENT tier, you will have the same version of exim. We will also be offering the ability to source RPMs from a custom repo. This means that, if you wish to provide your customer with your own version of ProFTPd or dovecot, it is now possible in a way that is supported (more on this in a future post).&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;Also, /etc/cpupdate.conf now uses a different format for determining the prescribed version. This file will break the update tier and update method into separate tiers.&amp;nbsp; A valid cpupdate.conf will now look something like:&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;CPANEL=release&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;UPDATES=manual&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;Valid values for CPANEL are: stable, release, current, edge.&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;Valid values for UPDATES are: automatic, manual, never.&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;b&gt;Addition of Cpanel::PublicAPI&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;cPanel &amp;amp; WHM 11.30 contains the first version of Cpanel::PublicAPI, a perl module capable of querying APIs from a single interface.&amp;nbsp; This module deprecates the old Cpanel::Accounting module and offers a few new pieces of functionality:&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;ul&gt; &lt;li class="li1"&gt;&lt;span class="s1"&gt;Automatic detection of credentials (when available)&lt;/span&gt;&lt;/li&gt; &lt;li class="li1"&gt;&lt;span class="s1"&gt;Interfaces for querying API1, API2, xml-api and our DNS clustering system&lt;/span&gt;&lt;/li&gt; &lt;li class="li1"&gt;&lt;span class="s1"&gt;Full legacy support for Cpanel::Accounting&lt;/span&gt;&lt;/li&gt; &lt;/ul&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;Eventually, a full set of modules will be available to query all of our APIs via any method available.&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;b&gt;Removal of Legacy Themes&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;In cPanel &amp;amp; WHM 11.28, we dropped support for x, x2, bluelagoon and monsoon. Within the 11.30 release cycle, we will stop distributing them all together.&amp;nbsp; If you develop a theme that is based off of one of these themes, we strongly suggest that you update to a theme using cPanel&amp;rsquo;s API2.&amp;nbsp; If you require guidance updating your themes, you can always contact us via our ticket system.&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;b&gt;New API Calls &amp;amp; Hook&lt;/b&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;We have added a few new API calls within version 11.30, specifically:&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;xml-api:&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;updateconfig - This call allows you to set your preferred release tier.&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;api2:&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;MysqlFE::adddb - Add a database&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;MysqlFE::adduser - Add a Mysql user&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;MysqlFE::adduserdb - Grant a user permission to access a DB&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;MysqlFE::addhost - Allow a new host to access Mysql&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;MysqlFE::deldb - Delete a database&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;MysqlFE::deluser - Delete a user&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;MysqlFE::delhost - Delete a host&amp;rsquo;s access&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;MysqlFE::deluserdb - Remove a user&amp;rsquo;s permission to access a database&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;Email::delforwarder - Allow deletion of Email Forwarders&lt;/span&gt;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;Email::adddomainforward - Add a domain forwarder&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;&lt;b&gt;Note: &lt;/b&gt;Documentation on these calls will be available once version 11.30 hits CURRENT.&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;Hook:&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;&amp;nbsp;&lt;/p&gt; &lt;p class="p1"&gt;&lt;span class="s1"&gt;We have now added a &amp;ldquo;modifyacct&amp;rdquo; hook at /usr/local/cpanel/scripts/postmodifyacct and /usr/local/cpanel/scripts/premodifyacct. It will be passed all the new values for an account.&amp;nbsp;&lt;/span&gt;&lt;/p&gt; &lt;p class="p2"&gt;----&lt;/p&gt;  &lt;p class="p1"&gt;&lt;a href="http://forums.cpanel.net/f42/blog-cpanel-11-30-a-194431.html#post797281"&gt;&lt;span class="s1"&gt;Questions or Comments can be left here&lt;br /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/ggkgBrfijmg" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2011/02/cpanel-1130-6.html</feedburner:origLink></entry>

<entry>
    <title>JSON vs. XML in LivePHP</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/coJdPjOJffE/json-vs-xml-in-livephp.html" />
    <id>tag:www.cpanel.net,2011:/blog/integration//62.8986</id>

    <published>2011-02-11T14:00:00Z</published>
    <updated>2011-02-11T14:50:36Z</updated>

    <summary>A while back, Matt Dees blogged about our upcoming change to LivePHP in 11.28. Specifically, he mentions the use of JSON. In this article I will illustrate, in brief, why this change was made. The decision process, as you'll see,...</summary>
    <author>
        <name>David N.</name>
        <uri>http://www.cpanel.net</uri>
    </author>
    
        <category term="cPanel" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;A while back, Matt Dees &lt;a href="http://www.cpanel.net/blog/integration/2010/10/upcoming-improvements-to-livephp.html"&gt;blogged&lt;/a&gt; about our upcoming change to LivePHP in 11.28.  Specifically, he mentions the use of JSON.  In this article I will illustrate, in brief, why this change was made.  The decision process, as you'll see, wasn't exactly straight forward, but a solid compromise.&lt;/p&gt;

        &lt;p&gt;I'm not going to expound on the benefits or drawbacks of using XML vs. JSON as a format. We've see those debates for a while now in various online (and offline) venues.  Instead, I'd like to talk about our choice to use JSON within LivePHP, based on data from a three point comparison we did.
&lt;/p&gt;

&lt;p&gt;First, let's go over some background information. The LivePHP class was originally written for PHP 4 compatibility.  Those were the days when we couldn't depend on having a parser for XML or JSON readily available within a given PHP binary.  One of the best options when we initially wrote LivePHP was to 'include' a pure PHP XML parser. But thankfully, PHP 4 has nearly gone the way of the dinosaurs and cPanel's internal build of PHP has been 5.2.x. for awhile now. This allowed us the opportunity to refactor the LivePHP class.
&lt;/p&gt;

&lt;p&gt;Once we decided to refactor the LivePHP class, we boiled our wish list down to two key points:
&lt;ol&gt;
 &lt;li&gt;Reduce resource consumption.&lt;/li&gt;
 &lt;li&gt;Maintain backwards compatibility for anyone who relied on an external parser or any legacy code within cPanel that produces a particular output string.&lt;/li&gt;
&lt;/ol&gt;
&lt;/p&gt;

&lt;p&gt;Maintaining backwards compatibility for the cPanel strings was a fairly easy task. We knew that XML strings were always sent in the legacy code, so as long as we could detect a "pure" XML structure, we could use SimpleXML or the pure XML parsing functions that were already being shipped. But which one &amp;mdash; SimpleXML or pure PHP? SimpleXML seemed like the obvious answer until we explored the full meaning of this compatibility goal.
&lt;/p&gt;

&lt;p&gt;Since we not only wanted compatibility on the string level, but also from the utility level, the idea of changing the external parsing functions needed more consideration and, as you'll see, compromise.  
&lt;/p&gt;

&lt;p&gt;The likelihood that someone uses those pure PHP functions directly (in their own, neighboring code) is small. However, if we were to suddenly remove them or rewrite their internals, the potential risk of breaking someone's application seemed too great. And thus, we struck a compromise: we would ship the parsing functions as they had always been and simply create a logic flow within the class that would fallback to the old functions if a legacy-style string happened to come across the wire.
&lt;/p&gt;

&lt;p&gt;The other goal was to reduce resource consumption. The refactoring process was not only about optimizing the code, but also making it "better. " While evaluating this class, we found a ton of stuff that we wanted to change. In the end, we had to ask ourselves, "How can we cover the most ground while making the fewest changes?" Sure, there were plenty of other changes like more robust logging, conforming to standard PHP 5 class conventions, and a more PEAR-ish coding style that would eventually make it into the final revision of LivePHP.  But really, the true gain would ultimately come down to dealing with the overhead of encoding and decoding the data stream.  This is where a few simple tests helped us decide that PHP's native JSON functions would work best for us.
&lt;/p&gt;

&lt;p&gt;For brevity's sake, I won't include the actual code in this article.  Fortunately, it's straight forward enough to describe the tests and present the results in a few charts.
&lt;/p&gt;

&lt;p&gt;We used two datasets, both based on real output from the Email::listpopswithdisk API2 function.. This function's return value is an itemized list of email account details for a cPanel account. The first set is very small; only two email accounts exist for the cPanel user. The second set is large, but not uncommon at 5000 email accounts for the cPanel user.
&lt;/p&gt;

&lt;p&gt;We'll compare three scenarios that all produce a PHP associative array:
    &lt;ol&gt;
     &lt;li&gt;JSON string decoded with "json_decode($str, true)" ["true" produces the array]&lt;/li&gt;
     &lt;li&gt;XML string decoded with the legacy pure PHP functions&lt;/li&gt;
     &lt;li&gt;XML string decoded with "simplexml_load_string($str)" [in a recursive callback to get an array]&lt;/li&gt;
    &lt;/ol&gt;
&lt;/p&gt;

&lt;p&gt;&lt;span class="mt-enclosure mt-enclosure-image" style="display: inline;"&gt;&lt;a href="http://www.cpanel.net/blog/integration/assets_c/2011/02/Blog_charts-598.html" onclick="window.open('http://www.cpanel.net/blog/integration/assets_c/2011/02/Blog_charts-598.html','popup','width=1186,height=719,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"&gt;&lt;img src="http://www.cpanel.net/blog/integration/assets_c/2011/02/Blog_charts-thumb-600x363-598.png" width="600" height="363" alt="Blog_charts.png" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The first, small dataset yielded mildly interesting results. The data makes it pretty clear that SimpleXML takes less memory at compile and execution time and during the life of the script. It also responds just as fast as the JSON.
&lt;/p&gt;

&lt;p&gt;However, in the large dataset, the results are a bit more intriguing. The JSON version is using more memory at the start of execution, but once the script is done, it consumes the least memory over time. As one might guess, the pure SimpleXML parsing consumes a noticeably larger amount of memory during its lifetime.  The pure PHP XML functions perform well, but as a whole they just aren't as good as the native JSON parsing.
&lt;/p&gt;

&lt;p&gt;And then there's the execution time on the larger dataset...wow! The pure PHP XML functions are just atrocious in comparison to the other two methods. SimpleXML, while consuming 42% more memory, took twice as long as the JSON.
&lt;/p&gt;

&lt;p&gt;Ultimately, we decided that PHP's native JSON parsing was the best fit. We had several debates about the various permutations of these scenarios and dataset sizes.  That is, with really small datasets, SimpleXML is the obvious tool of choice. We also did some analogous Perl testing to see how the other end of the system would perform. The results were conclusively in favor of JSON (we predominantly use JSON::XS nowadays).  So, in the end, we came to the consensus that datasets tend to be larger rather than smaller and that execution time is the hardest resource to compromise. This makes JSON the best all around solution for LivePHP.
&lt;/p&gt;

    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/coJdPjOJffE" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2011/02/json-vs-xml-in-livephp.html</feedburner:origLink></entry>

<entry>
    <title>Maintaining Application Compatibility</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/RI3IivgrNJo/maintaining-application-compatibility.html" />
    <id>tag:www.cpanel.net,2010:/blog/integration//62.8782</id>

    <published>2010-10-22T21:48:54Z</published>
    <updated>2010-10-22T21:55:43Z</updated>

    <summary><![CDATA[&nbsp;With version 11.28 of cPanel &amp; WHM making it's way into the production update tiers, now is a great time to discuss your application testing strategies. It's every developer's responsibility to test and verify their applications within their actual deployment...]]></summary>
    <author>
        <name>Matt Dees</name>
        
    </author>
    
    <category term="cpanel" label="cpanel" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;&amp;nbsp;&lt;meta charset="utf-8" /&gt;&lt;span class="Apple-style-span" style="font-family: arial, verdana, sans-serif; font-size: 14px; line-height: 20px; "&gt;With version 11.28 of cPanel &amp;amp; WHM making it's way into the production update tiers, now is a great time to discuss your application testing strategies. It's every developer's responsibility to test and verify their applications within their actual deployment environments. cPanel &amp;amp; WHM is a constantly evolving product. With each new version we aim to improve not only the end user experience, but also its suitability as a platform for your applications. We work hard to maintain a stable and consistent application platform, but sometimes changes for the better will require an additional effort from developers. We want to ensure that those changes happen before our customers and your end users notice a problem.&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; "&gt;Have you heard of a development license? cPanel offers a product license especially for cPanel &amp;amp; WHM application developers. You don't have to sign your life away or give up your trade secrets to qualify. We really just want you to work to extend the functionality of cPanel &amp;amp; WHM to meet your needs. One of the great things about the development license is that it allows you to have multiple environments to test your application. The only cost to you is in the hardware and connectivity. There are limitations of course, but they are very reasonable. You cannot use a development license to host paid accounts. There's also a small banner displaying that the server is running a development license in the cPanel &amp;amp; WHM interfaces. To apply for this license visit the&amp;nbsp;&lt;a href="http://www.cpanel.net/developer-app.html" target="_top" style="text-decoration: underline; color: rgb(69, 113, 208); background-color: transparent; "&gt;Developer&amp;rsquo;s License Application&lt;/a&gt;&amp;nbsp;page and answer a few simple questions. Once we have ensured the validity of your request, we will gladly provide you with a development license.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; "&gt;When testing your application, you should verify it against both production and development versions of cPanel &amp;amp; WHM. If you are unfamiliar with how the product is published then visit our page describing the&amp;nbsp;&lt;a href="http://docs.cpanel.net/twiki/bin/view/AllDocumentation/InstallationGuide/CpanelProductVersions" target="_top" style="text-decoration: underline; color: rgb(69, 113, 208); background-color: transparent; "&gt;cPanel &amp;amp; WHM versions and release process&lt;/a&gt;. In short, our EDGE releases represent the &amp;quot;cutting edge&amp;quot; version of the product and STABLE releases are our long-term support releases. If you notice a problem in any version then please contact us through our&lt;a href="http://tickets.cpanel.net/submit" target="_top" style="text-decoration: underline; color: rgb(69, 113, 208); background-color: transparent; "&gt;support system&lt;/a&gt;. We give developers high priority here at cPanel, and we will try to resolve your issue or answer your question as quickly as possible.&lt;/p&gt;&lt;p style="margin-top: 1em; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; "&gt;Developing and testing against both development and production releases will help ensure that your application will continue to work as you expect it for all your users.&lt;/p&gt;&lt;/span&gt;&lt;/p&gt;
        
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/RI3IivgrNJo" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2010/10/maintaining-application-compatibility.html</feedburner:origLink></entry>

<entry>
    <title>Upcoming Improvements to LivePHP</title>
    <link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/cpanel/blog/integration/~3/hvaEKOT6JIA/upcoming-improvements-to-livephp.html" />
    <id>tag:www.cpanel.net,2010:/blog/integration//62.8762</id>

    <published>2010-10-18T21:07:13Z</published>
    <updated>2010-10-22T17:35:58Z</updated>

    <summary><![CDATA[This past week, we have been working to improve&nbsp;livePHP. For those of you not familiar with livePHP, it is a PHP class that allows access to the cPanel &amp; WHM API1 and API2 system within an object-oriented PHP environment. We...]]></summary>
    <author>
        <name>Matt Dees</name>
        
    </author>
    
        <category term="Integration" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="livephpcpanelintegration" label="livephp cpanel integration" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://www.cpanel.net/blog/integration/">
        &lt;p&gt;This past week, we have been working to improve&amp;nbsp;&lt;a href="http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/LivePHP"&gt;&lt;span class="s1"&gt;livePHP&lt;/span&gt;&lt;/a&gt;. For those of you not familiar with livePHP, it is a PHP class that allows access to the cPanel &amp;amp; WHM API1 and API2 system within an object-oriented PHP environment.&lt;/p&gt;
&lt;p class="p1"&gt;We improved the backend of the livePHP system to use JSON for socket communication, which utilizes PHP&amp;rsquo;s native JSON internally. Our testing shows that this is a great deal faster (3X) than the previous XML-based serialization with custom PHP parsing functions.&lt;/p&gt;
&lt;p class="p1"&gt;Our intent has been to maintain compatibility with the legacy interface provided by the&amp;nbsp;&lt;b&gt;cpanel.php&lt;/b&gt;&amp;nbsp;class. However when changes of this nature are made, there is always a possibility of conflict. If you have an application, either for your internal use or public distribution, then we would love to get feedback on how this change has improved your product. We recommend that you&amp;nbsp;&lt;a href="http://tickets.cpanel.net/submit/"&gt;&lt;span class="s1"&gt;submit a support request&lt;/span&gt;&lt;/a&gt;&amp;nbsp;directly to us, so that we can help coordinate your testing. Please reference this article so that we can ensure your request gets the priority it deserves.&lt;/p&gt;
&lt;p class="p1"&gt;&lt;i&gt;It should be noted that this is not available in public builds yet, so a ticket will need to be opened in order to coordinate your testing.&lt;/p&gt;
        
    &lt;img src="http://feeds.feedburner.com/~r/cpanel/blog/integration/~4/hvaEKOT6JIA" height="1" width="1"/&gt;</content>
<feedburner:origLink>http://www.cpanel.net/blog/integration/2010/10/upcoming-improvements-to-livephp.html</feedburner:origLink></entry>

</feed>

