Child pages
  • Guide to the LiveAPI System - The cpanelprint() Method
Skip to end of metadata
Go to start of metadata

 

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

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

LiveAPI Perl Module

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

Parameters

ParameterTypeDescriptionPossible valuesExample
variablestringA cPanel variable.

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

Notes:

  • The single quotes in this example are required. The method does not interpolate them. Instead, it passes those quotes to cPanel's print function, 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.