Encoding of HTML templates and other non-PHP files

Top  Previous  Next

We have added an option for encoding HTML templates, or other non-PHP files, using the SourceGuardian encoder. HTML template or other non-PHP files may be encoded by the encoder and read and decrypted from the protected script itself. Within this document we will refer to these as "templates" for short, as there is no difference to the encoder between HTML templates, other templates or any other non-PHP files. Template files which are encoded as a part of a project may be used only from protected scripts which were encoded as a part of the same project. It's impossible to use protected templates from unencoded scripts or from scripts encoded with a different SourceGuardian project.

 

Internal project_id and project_key values are used for identifying the project and used as the encryption key for encoding templates. So please make sure to specify project_id (--projid option) with the command line encoder as well as project_key (--projkey option) for the project and external script license when generating the license with licgen tool. It's a good idea to specify the project_id for all your projects (unique for each) and additionally the project_key when an external license is used.

 

The SourceGuardian GUI interface generates a project_id and a project_key automatically for each new project. So you need to use only the same project for adding/changing encoded templates otherwise old templates cannot be used with newly encoded scripts and v.v. 

You may save your project_id and project_key values in a safe place for future use. The project_key value is also needed for correct license generation if you use it.  

 

Encoded templates will look like this:

SourceGuardianAAwAAAAFCgAAAAZ0jwEA/9QAMUp+g+GpvG3vbvYj4Is=