Description

This function generates bandwidth graphs for the specified day.

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

Examples 


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

 

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 Module="Bandwidth::displaybw( $FORM('domain','tmonth','tyear','tday') )">
cpapi1 --user=username Bandwidth displayday example.com 1 2014 25 subdomain.example.com

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

   

Parameters

ParameterTypeDescriptionPossible valuesExample
domainstring

Required

The domain name.

Any valid domain.example.com
targetstring

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

A placeholder value.''
tmonthinteger

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.1
tyearinteger

The year for which to generate bandwidth graphs.

This parameter defaults to the current year.

The four digits for the desired year.2014
tdateinteger

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
subdBoolean

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.