Giter VIP home page Giter VIP logo

mpcpanel's Introduction

mpcpanel

Yii extension to access cpanel functions - accepts json xml, cpanel 1 and 2 apis

##Requirements

##Install

put the download file under any imported directory
and in you components config file add the component

    return array(
       '...'
       'components'=>array(
            '...',//other components
            'cpanel'=>array(
                   'class'=>'MPCpanel',
                    'username'=>'yourUsername',//required
                    'url'=>'http://mydomain.com:2086/',// by default https://127.0.0.1:2087/
                    'auth_type'=>'basic',//accepted = basic or whm
                                         //basic by default
                    'api_type'=>'json',//accepted = json or xml
                                       //json by default
                    'password'=>'myPassword',//required for basic type of authentication
                    'access_key'=>'myBiggggggggggKey',//required for whm type of authentication
            ),
       ),
    );

##Usage

        $cpanel=Yii::app()->cpanel;
     
    //will use xml/json api
    $cpanel->listaccts();
     
    //will use xml/json api with parameters
    $cpanel->createacct(array('username'=>'myAccount','domain'=>'mydomain.com','password'=>'myPassword'));
    
    //will use cpanel api1 function webalizer, module Stats, no parameters
    $cpanel->webalizer('Stats');
     
    //will use cpanel api1 function adduserdb, module Mysql using parameters (*api1 parameters must be in order and as string) 
    $cpanel->adduserdb('Mysql','mydbname','mydbuser','all');
     
     //will use cpanel api2 function listwebalizer, module Stats
     //to call api2 make sure the second parameter is array, even if empty
    $cpanel->listwebalizer('Stats',array());
     
    //will use cpanel api2 function change_password, module Passwd using parameters (*api2 parameters must be an array using key/values pairs)
    $cpanel->username='client3';
    $cpanel->password='client3Password';
    $cpanel->change_password('Passwd',array('newpass'=>'m1n3wp4$$w0rd','oldpass'=>$cpanel->password));

##Resources

mpcpanel's People

Contributors

gusnips avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

kmhtoo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.