PHP code encryption I remember a very good friend who once worked hard on me. he used to work on a night shift for half a month and developed a PHP program for others. as a result, he met a profiteer, people accept the source code to test it first, and then disappear. the phone cannot be connected, and QQ is never online.
If you think about it carefully, the programs developed using PHP are all source code, which has been hard-coded and can be used by anyone. this is indeed a headache.
1. how to encrypt your php code?
2. enable the encrypted php code to run on other computers.
Reply to discussion (solution)
Create a space by yourself and put it in your own space when testing.
Encryption can still be cracked. you can upload the code to the website by yourself. others can view the effect through the domain name, and then send the source code to him after he pays.
Encryption can still be cracked. you can upload the code to the website by yourself. others can view the effect through the domain name, and then send the source code to him after he pays.
Encryption can still be cracked. you can upload the code to the website by yourself. others can view the effect through the domain name, and then send the source code to him after he pays.
Encryption can still be cracked. you can upload the code to the website by yourself. others can view the effect through the domain name, and then send the source code to him after he pays.
If the code is not encrypted, can he save it as a code, image, or script on the page to download it?
Encryption can still be cracked. you can upload the code to the website by yourself. others can view the effect through the domain name, and then send the source code to him after he pays.
The code saved as is only html on the page, and php cannot be seen, or the programmer will not be miserable.
Encryption can still be cracked. you can upload the code to the website by yourself. others can view the effect through the domain name, and then send the source code to him after he pays.
The code saved as is only html on the page, and php cannot be seen, or the programmer will not be miserable.
Well, how can we implement the following functions?
1. how to encrypt your php code?
2. enable the encrypted php code to run on other computers.
Professional encryption software (charged) is available for php code encryption. the encrypted code should be run in the corresponding decryption environment.
Zend pre-compilation tools are available for php code pre-compilation (charged but pirated), and zend virtual processors are also required for pre-compilation code.
Do the scrambling for php code. the scrambling code can be understood as self-decryption encryption, and there are no special requirements for running.
No matter what you do, the customer always needs to get the code that can run. The customer has used this code to do anything that should not be done, only to seek legal protection.
Although Chinese people are very smart, due to lack of legal awareness, the technology field is always lagging behind with Americans and Japanese .....
Can I use md5 for encryption? Can it be cracked after encryption?
Md5 is not encrypted, so there is no decryption
Besides, if the other party uses your encryption technology, can it decrypt the source code? So what is the significance of encryption?
Put your own space for testing. after testing, give it again. Or a secured transaction.
Function encode_file_contents ($ filename ){
$ Type = strtolower (substr (strrchr ($ filename, '.'), 1 ));
If ('php' = $ type & is_file ($ filename) & is_writable ($ filename) {// compress the code if the php file is writable.
$ Contents = file_get_contents ($ filename); // checks whether the file has been encoded.
$ Contents = php_strip_whitespace ($ filename );
// Remove the PHP header and tail identifiers
$ HeaderPos = strpos ($ contents ,' $ FooterPos = strrpos ($ contents, '?> ');
$ Contents = substr ($ contents, $ headerPos + 5, $ footerPos-$ headerPos );
$ Encode = base64_encode (gzdeflate ($ contents); // start encoding
$ Encode =' ";
Return file_put_contents ($ filename, $ encode );
}
Return false;
}
// Call a function
$ Filename = 'Test. php ';
Encode_file_contents ($ filename );
Echo "OK, encryption complete! "?>
There is no good method. Generally, only the page is provided, and the source code is provided after payment.
Function encode_file_contents ($ filename ){
$ Type = strtolower (substr (strrchr ($ filename, '.'), 1 ));
If ('php' = $ type & is_file ($ filename) & is_writable ($ filename) {// compress the code if the php file is writable.
$ Contents = file_get_contents ($ filename); // checks whether the file has been encoded.
$ Contents = php_strip_whitespace ($ filename );
// Remove the PHP header and tail identifiers
$ HeaderPos = strpos ($ contents ,' $ FooterPos = strrpos ($ contents, '?> ');
$ Contents = substr ($ contents, $ headerPos + 5, $ footerPos-$ headerPos );
$ Encode = base64_encode (gzdeflate ($ contents); // start encoding
$ Encode =' ";
Return file_put_contents ($ filename, $ encode );
}
Return false;
}
// Call a function
$ Filename = 'Test. php ';
Encode_file_contents ($ filename );
Echo "OK, encryption complete! "?>
The original page content becomes
Eval (gzinflate (base64_decode ('Encoding = ')));
The running effect is not from the original page
This is understandable. general encryption is useless.
The effect I want is that the source code is garbled, but the running effect can be displayed. it is not considered if the attack is not easy to crack.
There are a lot of PHP encryption codes, but they are easy to solve ~~~
The above implementation will not be taken into consideration in this regard.