Documentation
IPS_GetScript
array IPS_GetScript (int $ScriptID)
Parameters
| ScriptID | ID of the script |
Returns
The following information is available as key => value pairs:
| Index | Type | Description |
|---|---|---|
| IsBroken (until 3.4) | boolean | TRUE if an error occurred during the last execution of the script, otherwise FALSE (since 4.0 replaced by ScriptIsBroken) |
| LastExecute (until 3.4) | integer | Unix timestamp of the last call (since 4.0 replaced by ScriptExecuted) |
| ScriptCRC (since 5.1) | string | CRC32 of the file |
| ScriptIsBroken (since 4.0) | boolean | TRUE if an error occurred during the last execution of the script, otherwise FALSE |
| ScriptExecuted (since 4.0) | integer | Unix timestamp of the last call |
| ScriptFile | string | Filename of the script |
| ScriptID | integer | ID of the script |
| ScriptSize (since 5.1) | integer | Size in bytes |
| ScriptType | integer | Type of the script (0 (SCRIPTTYPE_PHP): PHP script, 1 (SCRIPTTYPE_FLOW): Flow script, 2 (SCRIPTTYPE_IPSWORKFLOW): IPSWorkflow) |
| ScriptUpdated (since 5.1) | integer | Unix timestamp of the last update |
Description
This function returns an array containing information about the script with the ID ScriptID.
Example
// Since version 5.1
print_r(IPS_GetScript(46413));
/* Exemplary output:
Array
(
[ScriptID] => 46413
[ScriptType] => 0
[ScriptFile] => 46413.ips.php
[ScriptUpdated] => 1542622765
[ScriptExecuted] => 1542295981
[ScriptCRC] => 8132DEB6
[ScriptSize] => 42
[ScriptIsBroken] =>
)
*/
// Since version 4.0
print_r(IPS_GetScript(46413));
/* Exemplary output:
Array
(
[ScriptIsBroken] =>
[ScriptExecuted] => 1204933792
[ScriptFile] => 46413.ips.php
[ScriptID] => 46413
[ScriptType] => 0
)
*/
// Until version 3.4
print_r(IPS_GetScript(46413));
/* Exemplary output:
Array
(
[IsBroken] =>
[LastExecute] => 1204933792
[ScriptFile] => 46413.ips.php
[ScriptID] => 46413
[ScriptType] => 0
)
*/