cPanel API 1 Functions - Bandwidth::displayday

Description

This function generates bandwidth graphs for the specified day.

Warning:

We removed this function in cPanel & WHM version 11.52. We strongly recommend that you use the following UAPI function instead of this function:

  • UAPI (recommended) — Bandwidth::query — This function queries an account's bandwidth data and returns a report.

Examples 


 LiveAPI PHP Class
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$daily_bandwidth_graph = $cpanel->api1('Bandwidth', 'displayday', array('example.com', '1', '2014', '25') ); // Call the function.

 LiveAPI Perl Module
my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $daily_bandwidth_graph = $cpliveapi->api1('Bandwidth', 'displayday', ['example.com', '1', '2014', '25'] ); # Call the function.

 cPanel Tag System (deprecated)

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.

<cpanel Module="Bandwidth::displaybw( $FORM('domain','tmonth','tyear','tday') )">

 Output (images)

This function opens multiple bandwidth graph images in the web browser.

Parameters

 Parameter 

Type

Description

Possible values

Example

 domain

 string

 Required

 The domain name.

 Any valid domain.

 example.com 

 target

 string

 The system does not use this parameter, and will ignore the value.

 A placeholder value.

 ''

 tmonth

 integer

 The month for which to generate bandwidth graphs.

 This parameter defaults to the current month.

 An integer between 1 and 12 that corresponds to a month of the year.

 jan

 tyear

 integer

 The year for which to generate bandwidth graphs.

 This parameter defaults to the current year.

 The four digits for the desired year.

 2014

 tdate

 integer

 The day of the month for which to generate bandwidth graphs.

 This parameter defaults to the current day.

 An integer between 1 and 31 that corresponds to a day of the month.

 25

 subd

 boolean 

 The type of bandwidth graphs.

 This parameter defaults to 0.

  • 1 — Displays graphs for all traffic and for HTTP traffic.
  • 0 — Displays graphs for all traffic, HTTP, SMTP, FTP, POP3, and IMAP.

 0


Returns

This function opens multiple bandwidth graph images in the web browser.

 

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