Description

This function displays a directory's leech protection status.

Examples




$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$status_leech = $cpanel->api1('LeechProtect','status', array('/home/username/public_html/protected_directory/') ); // Call the function.

 



my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $status_leech = $cpliveapi->api1('LeechProtect', 'status', ['/home/username/public_html/protected_directory/']); # Call the function.

 


<cpanel Module="LeechProtect::status( $FORM('dir'))">




cpapi1 --user=username LeechProtect status /home/username/public_html/protected_directory/



enabled




Parameters

ParameterTypeDescriptionPossible valuesExample
dirstring

Required

The directory's path.

A valid absolute directory path.
/home/username/public_html/protected_directory/

Returns

  • enabled — LeechProtect is enabled.
  • disabled — LeechProtect is disabled.