PHP_Control


PHP_Control{( enableDisable ; password )}


 

Description


Allows you to enable or disable the plug-in or get the current status.

 

Parameters


enableDisable (optional)
1 to enable or 0 to disable.

password (optional)
The password to use when enabling or disabling the plug-in. When enabling the plug-in, the password must match the password used to disable it.

 

Return


Returns 0 when the plug-in is successfully enabled or disabled or an error if the password to enable the plug-in is not correct. Returns the current status when called with no parameters.

 

Errors


105 Plug-in could not be enabled (incorrect password)
106 Invalid parameter; You must specify the password parameter.

 

Example 1 - Disable plug-in
PHP_Control ( 0 ; "secret" )
/*
Returns: 0 // No error, plug-in successfully disabled
*/
Example 2 - Wrong password
PHP_Control ( 0 ; "123456" )
/*
Returns: 105 Plug-in could not be enabled (incorrect password)
*/
Example 3 - Correct password
PHP_Control ( 1 ; "secret" )
/*
Returns: 0 // No error, password is correct, plug-in successfully enabled
*/
Example 4 - Get status
PHP_Control
/*
Returns: 1 // Plug-in status is enabled
*/