Guide to the LiveAPI System - The fetch() Method

Description

The fetch() method is a wrapper to return a hash reference from the  cpanelprint()  function, which retrieves a cPanel variable.

Note:

To return a data result for a cPanel variable's value, use the cpanelprint() method. 

Example  


LiveAPI PHP Class

1
2
// Get a hashref of the cPanel account's username.
$cpanel->fetch('$user');




LiveAPI Perl Module

1
2
# Get a hashref of the cPanel account's username.
$cpliveapi->fetch('$user');


Parameters

 Parameter 

 Type 

Description

Possible values

 Example 

variable

string

 A cPanel variable. 

A valid cPanel variable.

 

$user

 

Returns

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

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