|
Custom Constants |
Top Previous Next |
|
SourceGuardian let you define custom named constants during encoding process or within an external script license. Constant name/value pairs are stored internally in the encrypted area of the protected script or external license. They may be used for custom script locking or any other actions if you need to store a custom value in protected script or script license file and then retrieve it from your PHP code.
To get a predefined constant value from the PHP code use sg_get_const() function. This function is defined in SourceGuardian loader.
Syntax: string sg_get_const( string )
Will return a predefined SourceGuardian constant value or FALSE if constant with the specified name is not defined. SourceGuardian constants names are *case sensitive*.
There are 5 constants predefined for each protected script:
|