Software Development Kit

cPanel & WHM's API [+] cPanel & WHM's API [-]


Modules and Plugins [+] Modules and Plugins [-]


cPanel & WHM Hooks [+] cPanel & WHM Hooks [-]


cPAddons (Site Software) [+] cPAddons (Site Software) [-]


System Administration [+] System Administration [-]


Developer Software [+] Developer Software [-]


Back to All Documentation



integrationblogcta.jpg

Stats Module Documentation

Allows a user to view statistics information

The functions within this module may or may not be governed by a feature list. The required feature list may vary from function to function, to review a total list of the available features sets on a cPanel server, please see "Feature Manager" in WHM.

Stats::webalizerftp

API Version: 1 - Click here for documentation
Syntax: Stats::webalizerftp( )
Description: Retrieve the URL to the Webalizer FTP statistics.
Returns:  
 
The output should resemble the following:

/tmp/$user/webalizerftp/index.html

Stats::lastvisitors

API Version: 1 - Click here for documentation
Syntax: Stats::lastvisitors( domain, ssl, file, numlines )
Description: Retrieve the most recent visitors to a domain.
Parameters:  
  domain (string)
  The domain whose most recent visitors will be displayed.
  ssl (boolean(optional))
  Specifying 0 displays the normal log file. Specifying 1 displays the SSL log file.
  file (string (optional))
  The file to poll for the most recent visitors. In most cases, this parameter will be unnecessary, as this field is automatically populated using the domain name.
  numlines (integer)
  The number of recent visitors that you wish to view.
Returns:  
 
The output will contain a chunk of HTML that includes information about the latest visitors to the specified domain.

Stats::webalizer

API Version: 1 - Click here for documentation
Syntax: Stats::webalizer( domain )
Description: Retrieve the Webalizer URL for a specific domain.
Parameters:  
  domain (string)
  The domain whose stats URL will be displayed.
Returns:  
 
The output should resemble the following:
/tmp/$username/webalizer/index.html

Stats::showbandwidth

API Version: 1 - Click here for documentation
Syntax: Stats::showbandwidth( )
Description: Display bandwidth usage for domains associated with the cPanel account. This function will include pie charts with its output.
Returns:  
 
The output will contain HTML that indicates the bandwidth usage.

Stats::awstats

API Version: 1 - Click here for documentation
Syntax: Stats::awstats( domain )
Description: Retrieve the URL to AWStats for a specified domain.
Parameters:  
  domain (string)
  The domain for which to display the stats URL.
Returns:  
 
The output should resemble the following:

/awstats.pl?config=example.com&lang=en

Stats::errlog

API Version: 1 - Click here for documentation
Syntax: Stats::errlog( domain )
Description: Display the last few entries from the error log for a specific domain.
Parameters:  
  domain (string)
  The domain corresponding to the error log to be displayed.
Returns:  
 
The output will contain the last few entries from the error log. This output will not include HTML tags.

Stats::analoglist

API Version: 1 - Click here for documentation
Syntax: Stats::analoglist( ddomain, sopts )
Description: Retrieve a list of links to Analog stats.
Parameters:  
  ddomain (string)
  The domain whose stats will be displayed.
  sopts (boolean (optional))
  Passing 1 to this parameter retrieves statistics for SSL connections. Passing 0 to this parameter retrieves statistics about unsecured connections.
Returns:  
 
A list of links to Analog stats, organized by month.

Stats::bwbar

API Version: 1 - Click here for documentation
Syntax: Stats::bwbar( )
Description: Retrieve a bar that indicates bandwidth usage for the account's domains.
Returns:  
 
The output should resemble the following:
<table><tr><td class=barborder><img src=bar.gif height=8 width=${barlength}><img src=wbar.gif height=8 width=${wbarlength}></td><td>${percent}% used</td></tr></table>


Topic revision: r2 - 29 Mar 2012 - 15:22:20 - Main.JenniferDoubrava