Prepation of scripts with GUI tool
Prepation of scripts with console tool
Install PHTML Encoder
There are three ways to implement PHTML Encoder:
The first method requires no changes to PHP installation, but you must put a phtmlenc-4.X.X.dll in every PHP script directory. The other two options require change to PHP installation. Details for each installation method follows:
1. Self-decodable scripts
Self-decodable scripts require a phtmlenc-4.X.X.dll library file in every PHP script directory. Copy the correct phtmlenc-4.X.X.dll file in PHTML Encoder directory, where X.X is a version of your PHP engine.
2. Install PHP extensions
Copy the correct extension file to the PHP extensions directory or your Windows path. Please use the 'phtmlenc4.X.X.dll' file in PHTML Encoder directory, where X.X is a version number of your PHP engine. Find PHP.INI file for 'extension_dir' parameter. Add 'extension='phtmlenc4.2.1.dll' string to your PHP.INI file to this section. To confirm that your extension is being used, run phpinfo(). Results must contain the 'PHTML Encoder v.3.3 extension | enabled' string.
3. Replace PHP engine library
To replace the PHP engine library, you must replace a file named 'php4ts.dll' on your system with the php4ts.dll from PHTML Encoder distribution package. Typical locations of existing php4ts.dll library are C:\PHP\ or C:\WINNT\System32.
Important: BACKUP your existing php4ts.dll file prior to replacing it with the new one.
Make sure you have replaced the needed library. To make sure, leave the web server running and then try renaming the existing php4ts.dll file. If this operation is forbidden by system, then this is exactly the library you need. Stop your web server, replace the library and start your web server again.
Preparation of scripts
To encrypt /decrypt your scripts, run PHTML Encoder converter.
Below you can see screenshot of GUI conversion tool.
To encode your scripts, select the source folder and press the Encrypt button. To decode a script, press Decrypt button.
Choose a target directory with Browse button or the Target directory control.
Checking with sub-dirs includes sub-folders of the target directory. Checking copy other files will copy non-scripts files (images, zip-files, etc).
Checking make self-decodable scripts produces self-decodable scripts.
You can change files
filter option by pressing .
The file wildcards rules are following:
? Matches single
character.
*
Matches zero or more characters.
[abc]
Matches a single character, which must be a, b, or c.
[^abc] Matches a
single character, which must be anything other than a, b, or c.
[!abc] Ditto.
[a-zA-Z] Matches single
character, which must be one of a-z or A-Z.
[^a-zA-Z] Matches single character,
which must be anything other than a-z or A-Z.
[!a-zA-Z] Ditto.
pat1|pat2 Matches either pat1 or
pat2.
pat1,pat2 Ditto.
(pat1|pat2) Matches either pat1 or pat2;
patterns may be nested.
(pat1,pat2)
Ditto.
Examples:
*.php4,*.php,*.inc Matches some common extensions for PHP scripts (default).
test.(inc,php4,php) Matches a file called test given as either inc,php4 or php.
*.[^inc] Matches any file except files with inc extension.
You may use the console version to encode/decode your scripts.
Open a Command Prompt window and change dir to the PHTML Encoder directory.
Type phtmlec.exe with following options:
"phtmlec.exe [-switch]... function source [target]" ,
here -switch - one or more switches from following list:
-r - include subfolders
-d - delete source file(s) after encription/decryption
-c - copy other (non-script) file(s).
-s - make self-decodeable script(s).
-w parameter - use wildcards for files, parameter is wished wildcards (default *.php,*.php4,*.inc), see above wildcard rules.
function - {e|d} : e - encryption, d - decryption;
source, target - input and output file or directory name; If don't output file is specified source file is used for output.
Example 1: "phtmlec.exe e index.php index1.php" (encryption of index.php to index1.php)
Example 2: "phtmlec.exe d -r -c -w admin*.php C:\WWW\ C:\WWW2\" (decryption of files admin*.php from directory C:\WWW to C:\WWW2 with subdirectories and copying other files).