Description

This function configures a cPanel account's mod_deflate setting.

Examples


$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$configure_mod_deflate = $cpanel->api1('OptimizeWS', 'optimizews', array('all', 'text/html') ); // Call the function.

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
my $configure_mod_deflate = $cpliveapi->api1(OptimizeWS, optimizews ['all', 'text/html',]); # Call the function.

<cpanel Module="OptimizeWS::optimizews ( $FORM('deflate_selection', 'deflate_mime_list') )">
cpapi1 --user=username OptimizeWS optimizews all text/html

This function does not return output.

Parameters

ParametersTypeDescriptionPossible valuesExample
deflate_selectionstring

Required

The types of files to compress.

  • all — Compress all file types.
  • disabled — Disable the mod_deflate module for the cPanel account.
  • list — Compress only MIME types in the deflate_mime_list parameter.
all
deflate_mime_liststring

Required

The MIME types to compress.

  • text/html
  • text/plain
  • text/xml

text/html

Returns

This function does not return output.