Child pages
  • cPanel API 1 Functions - OptimizeWS::optimizews

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

 

Description

Excerpt

This function configures a cPanel account's mod_deflate setting.

Include Page
LIB:_cPanelAPI1NoEquivalent
LIB:_cPanelAPI1NoEquivalent

Panel
bgColor#F2F2F2
borderStylenone

Examples


Panel
bgColor#FFFFFF
borderStylenone
Expand
titleLiveAPI PHP Class
Code Block
languagephp
linenumberstrue
$cpanel = new CPANEL(); // Connect to cPanel - only do this once.
$configure_mod_deflate = $cpanel->api1('OptimizeWS', 'optimizews', array('all', 'text/html') ); // Call the function.

Include Page
LIB:_LiveAPIPHPLink
LIB:_LiveAPIPHPLink

Expand
titleLiveAPI Perl Module
Code Block
languageperl
linenumberstrue
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.

Include Page
LIB:_LiveAPIPerlLink
LIB:_LiveAPIPerlLink

Expand
titlecPanel Tag System (deprecated)

Include Page
LIB:_cPanelTagsWarning
LIB:_cPanelTagsWarning

Code Block
languagetext
<cpanel Module="OptimizeWS::optimizews ( $FORM('deflate_selection', 'deflate_mime_list') )">
Expand
titleCommand Line
Code Block
languagebash
cpapi1 --user=username OptimizeWS optimizews all text/html

Include Page
LIB:_cPanelAPI1CLINote
LIB:_cPanelAPI1CLINote

Expand
titleOutput (none)

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.