cPanel API 1 - Deprecated cPanel Tag Usage

Introduction

 The deprecated cPanel tag system used the <cpanel > HTML tag to call cPanel API 1.

Warning:

cPanel API 1 is deprecated. We strongly recommend that you use cPanel API 2 or UAPI instead. 

Warning:

In cPanel & WHM version 11.30 and later, cPanel tags are deprecated. This example is present in order to help developers move from the old cPanel tag system to our LiveAPI.

We strongly recommend that you only use the LiveAPI system to call the cPanel APIs.

Basic usage

To call cPanel API 1 with the cPanel tag system, use the following format:

<cpanel Module="function('parameter','parameter','parameter')">

This example uses the following variables:

Variable

Description

Possible values

Example

 Module

 The function's module.

 Any cPanel API 1 module.

Email

 function

 The function name.

 Any cPanel API 1 function in the specified module.

addpop

 parameters

 The input parameter values to pass to the function.

 Important:

 cPanel API 1 functions are case-sensitive and use ordered parameters. You must list parameters in the order in which they appear. 

 

example.com

 

For example, the following cPanel tag code calls the  Email::addpop function:

<cpanel Email="addpop('example.com','user','12345luggage','100')">

The $FORM variable: Pass POST and GET data

To pass POST and GET data in cPanel tags, use the $FORM variable. This variable is a hash that the cpsrvd daemon parses. It contains all of the POST and GET data that the system passes to a particular interface in cPanel.

For example, you might call a page with the following POST and GET parameters:

addpop.html?username=test&pass=testing123&domain=testdomain.com&quota=10

Pass this information to cPanel API 1 in the following manner:

<cpanel Email="addpop($FORM{'domain','username','pass','quota'})">
 
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....