Guide to the LiveAPI System - The cpanelprint() Method

Description

The cpanelprint() method returns  a cPanel variable's value.

Warning:

Despite its name, this method does not print a value. 

Note:

To return a hash reference of a cPanel variable's value, use the fetch() method. 

Example


LiveAPI PHP Module

1
2
// Retrieve the cPanel account's username.
$cpanel->cpanelprint('$user');




LiveAPI Perl Module

1
2
# Retrieve the cPanel account's username.
$cpliveapi->cpanelprint('$user');



Parameters

 Parameter 

Type

Description

Possible values

Example

variable

 string 

 A cPanel variable. 

A valid cPanel variable. Surround this variable with single quotes ('')

Notes:

  • The single quotes in this example are required. The method does notinterpolate them. Instead, it passes those quotes to cPanel's printfunction, which requires them in order to return the correct value. 
  • For a full list of cPanel variables, read our Guide to cPanel Variables. 

'$user'

 

Returns

This method returns the cPanel variable's value as a string.

  • 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....