Description
This function generates a monthly bandwidth graph.
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
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
domain |
string |
Required The domain name. |
Any valid domain. |
example.com |
target |
string |
Required The domain name. |
The domain return's value. Important: This valuemust match the domainvalue.
|
example.com |
tmonth |
string |
Required The month for which to retrieve bandwidth data. |
The first three letters of a month's name, in English. |
jan |
tyear |
integer |
Required The year for which to retrieve bandwidth data. |
The four digits for the desired year. |
2014 |
subd |
string |
The subdomain for which to retrieve bandwidth data. If you do not use this parameter, the function returns bandwidth data for all of the specified domain's subdomains. |
Any subdomain on the specified domain. |
subdomain.example.com |
timezone
|
string |
The timezone in which to report the data. This parameter defaults to the domain's timezone. |
A timezone in Olson tz format. |
America/Chicago |
Returns
This function returns HTML to display a generated bandwidth graph image.
- The image file will use the
.png
extension. - The system stores the image file in the
tmp
directory.