Download the PHP package zanysoft/cpanel-api without Composer

On this page you can find all versions of the php package zanysoft/cpanel-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
zanysoft/cpanel-api
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package cpanel-api

Cpanel's API

Cpanel's API 1 and 2 for Laravel

Contents

Installation Guide

Require this package in your composer.json and update composer. This will download the package.

composer require zanysoft/cpanel-api

If using < Laravel 5.5, add the ServiceProvider and Aliases in config/app.php

'providers' => [
    '...',
    ZanySoft\Cpanel\CpanelServiceProvider::class,
];

'aliases' => [
    '...',
    'Cpanel' => ZanySoft\Cpanel\Facades\Cpanel::class,
];

Configuration

The defaults configuration settings are set in config/cpanel.php. Copy this file to your own config directory to modify the values. You can publish the config using this command:

php artisan vendor:publish --provider="ZanySoft\Cpanel\CpanelServiceProvider"

Usage

You can create a new Cpanel instance.

$cpanel = Cpanel::make();
$cpanel->setHost($host_ip);
$cpanel->setAuth($username, $password) //if you don't want to set in config file
return $cpanel->api2($user, $module, $function, $args = array());

Or use the facade:

return Cpanel::api2($user, $module, $function, $args = array());

You can use the facade with chain the methods:

return Cpanel::setHost($host_ip)->setAuth($username, $password)->api2($user, $module, $function, $args = array());

You can set the authentication before chain if you don't want to set this in config/cpanel.php file.

return Cpanel::setAuth($username, $password)->api2($user, $module, $function, $args = array());

You can set host, username and pasword on createing instance if you don't want to set this in config/cpanel.php file.

$cpanel = new \ZanySoft\Cpanel\Cpanel($host,$username, $password);
// OR
$cpanel = Cpanel::make($host,$username, $password);

Functions

This is the example when you want to define your configuration

If you like to get some list accounts from cPanel/WHM

If you want to create new subdomain

For accessing cPanel API 2, you can use this.

For accessing cPanel API 1, you can use this.

Documentation

Visit this link for api2 options: https://documentation.cpanel.net/display/SDK/Guide+to+cPanel+API+2

Visit this link for api1 options: https://documentation.cpanel.net/display/SDK/Guide+to+cPanel+API+1


All versions of cpanel-api with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
illuminate/support Version ^6.0 |^7.0|^8.0|^9.0|^10.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package zanysoft/cpanel-api contains the following files

Loading the files please wait ....