定制 dezento/cpanel-api 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dezento/cpanel-api

Composer 安装命令:

composer require dezento/cpanel-api

包简介

Simple wrapper class for cPanel UAPI.

README 文档

README

Simple wrapper class for cPanel UAPI. It uses php magic methods to make simple interface.

Overview

UAPI accesses the cPanel interface's features.

How cPanel API Works

image

How this class works ?

This class creates methods on the fly using php magic method __call() to construct methods you call.

Usage is very simple you copy exact cPanel API module name from the cPanel endpoint and add word Module to it then call it as php method.

Example: EmailModule()

Then you copy exact cPanel API method name and call it as php method.

Example: add_mx()

Installation

composer require dezento/cpanel-api

Usage

For example you want to list all domains under cPanel account you can copy endpoint from the official documentation.

/DomainInfo/list_domains

All you need to do then is to add word Module to the module name and call it as method,

DomainInfoModule()

and then write cPanel method name as php method.

list_domains()

use Dezento\CpanelApi;

$cpanel = CpanelApi::setCredentials("cPanelUrl", "cPanelUser", "cPanelPassword")
        ->DomainInfoModule() // cPanel module
        ->list_domains() // cPanel Function
        ->get();

If you need to send some parameters you can use setQueryParams() method which accepts array as input.

use Dezento\CpanelApi;

$cpanel = CpanelApi::setCredentials("cPanelUrl", "cPanelUser", "cPanelPassword")
        ->DomainInfoModule() // cPanel module
        ->setQueryParams([
          'domain' => 'examplewebsite.com',
          'return_https_redirect' => 1 
        ])
        ->single_domain_data() // cPanel Function
        ->get();

统计信息

  • 总下载量: 115
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固