cpanel xmlapi with codeigniter

You can download cpanel xmlapi php wrapper from this link http://forums.cpanel.net/f42/xml-api-php-class-version-1-0-a-136449.html

to integrate with codeigniter, you can put xmlapi.php file inside your plugins folder. If that folder is not exist.. you need to create yourself. make sure you rename it into xmlapi_pi.php.

systemapplicationpluginsxmlapi.php

after that.. you can use it in your controller like this

    $this->load->plugin('xmlapi');
    $xmlapi = new xmlapi($ip);
    $xmlapi->password_auth($cpanelUser,$cpanelPwd);
    $xmlapi->set_port(2083);
    $xmlapi->set_debug(1);

For more detail about cpanel api, you can read http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/WebHome . Do not hesitate to ask me here if you want to know more detail or sample how to use it.

About ibnuyahya

Ibnuyahya has written 91 post in this blog.

Ibnuyahya merupakan seorang software developer dan freelance consultant. Berpengalaman lebih dari 10 tahun dalam membangunkan perisian dari embedded sistem menggunakan micro-controller, windows application, mobile, image processing, artificial intelligent dan akhirnya menumpukan sepenuh tenaga dalam web application.