Codeigniter cPanel / WHM XMLAPI Library

In the past post, http://ibnuyahya.com/cpanel-xmlapi-with-codeigniter/ I’ve shared how to use cpanel xmlapi in codeigniter. However, since CI 2.x.. plugins have been removed. But don’t worry, you still can use helper to import external php class.

  1. Download xmlapi class from the following url https://github.com/CpanelInc/xmlapi-php
  2. Rename the file as xmlapi_helper.php and put in your helpers directory application\helpers\xmlapi_helper.php
  3. Done. you can call your xmlapi class as the following example
$this->load->helper('xmlapi');
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth($cpanelUser,$cpanelPwd);
$xmlapi->set_port(2083);
$xmlapi->set_debug(1);

About ibnuyahya

Ibnuyahya has written 104 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.