Friends who have used the php_screw tool in the past must like it very much. However, since php_screw-1.5.tar.gz is the last version, it is no longer updated, and the old version cannot be used in php5.3 or later versions. After modifying the source code, you can use the modified version in php5.3 or later versions. Test Environment: centos6.5php5.6apahche2.4.10
Friends who have used the php_screw tool in the past must like it very much. But since the last versionThe php_screw-1.5.tar.gz is no longer updated, and the old version cannot be used in php5.3 or later versions. After modifying the source code, you can use the modified version in php5.3 or later versions.
Test environment centos 6.5 php5.6 apahche2.4.10
Test procedure:
1. download the latest php_screw-1.5_php5.3.tgz version through the following link
Http://download.csdn.net/detail/fengxupeng1979/8776279
2. tar zxvf php_screw-1.5_php5.3.tgz
3. enter the decompressed directory.
4. run the phpize command.
5 ../configure
6. make
7.Copy the php_scresponso file under the modules directory to the php extension directory.
8. edit the php. ini file.
Add the following statement to the php. ini file:
Extension = php_scresponso
9.Restart Apache
/Srv/apache/bin/apachectl restart
8. Compile the encryption tool
Cd tools
Make
9. copy the tool screw used for encryption under the tools directory to the appropriate directory.
Cp screw/usr/bin/
Usage:
1. vim test. php creates a php file. For example:
[Php]View plaincopy
-
- Phpinfo ();
- ?>
2. execute screw test. php to put the generated encrypted file into the webpage directory and access it through a browser to check whether the file is normal.
If the encrypted test. php file is not generated, check the screw permission settings chmod 755/usr/bin/screw.
3. batch processing script files can encrypt the files in the entire directory at one time.
The content of the cryptphp. sh file is as follows:
[Plain]View plaincopy
- #! /Bin/sh
- DATE = 'date + % Y % m % d % H % M'
- Tar czf $ {DATE} bak. tgz $1
- Find $1-name "*. php"-print | xargs-n1 screw
- Find $1-name "*. screw"-print | xargs-n1 rm-v
4. after adding executable permissions, encrypt your code.
Ps: Tested php5.3 and later versions are completely available. However, in the spirit of php open source, I hope you can share more code and exchange more. So that everyone can be improved. Thank you.