Description

This function retrieves a list of a domain's most recent visitors.

Examples 


$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$get_lastvisitors = $cpanel->api1('Stats','lastvisitors', array('example.com','0','/path/to/thelogfile.log','5') ); // Call the function.

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $get_lastvisitors = $cpliveapi->api1('Stats','lastvisitors', ['example.com','0','/path/to/thelogfile.log','5'] ); # Call the function.

 

<cpanel Module="Stats::lastvisitors($FORM('domain','ssl','file','numlines')">
cpapi1 --user=username Stats lastvisitors example.com 0 /path/to/thelogfile.log 5

/tmp/$user/webalizerftp/index.html

Parameters

ParameterTypeDescriptionPossible ValuesExample
domainstring

Required

The domain name.

A valid domain name.example.com
sslBoolean

Whether to display the normal or SSL log file.

This value defaults to 0.

  • 1 — Display the SSL log file.
  • 0 — Display the normal log file.
0
filestring

The path to the log file.

This value defaults to the correct file path.

A valid absolute file path./path/to/thelogfile.log
numlinesinteger

Required

The number of recent visitors to view.

A valid integer.5

Returns

This function displays HTML that contains information about the latest visitors to the specified domain.