How to compile PHP source code (introducing the installation method of Zend Encode) Author: Nature Mailbox: zhanmr@telekbird.com.cn Home page: http://zhanzhen.wayall.com Friends have been asking how to protect PHP source code, like The same as SCRENC in ASP (although SCRENC has already been cracked). Thankfully, Zend, a company that has been committed to the development of PHP, has brought us the latest tool Zend Encoder, which can realize the function of compiling PHP source code. For a functional introduction to Zend Encoder, please see: http://www.chinaasp.com/sqlbbs/showAnnounce.asp?id=588883 Because the official version of Zend Encoder costs US$2,400. So we poor people can only use the limited version. It seems to have all the functions, but it is only good for a month. Now I will take you to install it and see if it is really that cool. . :) The installation steps are extremely complicated. . I will take you step by step, please follow me. . :) My system environment: WINNT4+APACHE1.3.17+PHP4.0.4pl1 (APACHE mode) 1. First go to www.zend.com to register a user https://www.zend.com/add_user.php 2. Go to your registration mailbox After getting the login name and password, go to https://www.zend.com/login.php to log in. If successful, it will automatically jump back to the Zend homepage. At this time, click Store in the navigation bar on the upper right side of the homepage, and then Then click Enterprise Products, then click Zend Encoder Unlimited, and then click Price: $2400 on the right. There is a link to Test drive available below. After entering, click the Test drive available button on the lower right. At this time we will see Zend related information. Product, select GetIt (play button) on the right side of Zend Encoder Unlimited Test Drive. 3. Finally see the Download button, right? ? Are you happy? Wrong, actually this is just the beginning. :(. When you see that there are three steps, don’t download it immediately, because there is no license agreement from Zend company, and you can’t use it after downloading. First click Step 2: Request Product License. At this time, Zend needs us to provide a host id number, saying This is a unique identifier that identifies your computer. You can click the How do I find my host ID link on the right to download a software to view the identifier. If you are a WINDOWS user, you can enter the following command to get the internal number of your network card. ipconfig /all and you will get this string of characters: Physical Address. . . . . : 00-80-C8-DB-FC-39. Remove the - number and get your HOSTID number 0080C8DBFC39, and then add this paragraph Copy the characters into the Enter host ID: input box, click the Request link, and the system will send the license agreement for your machine to your mailbox. Don't worry, it may take 24 hours to receive it. Waiting and waiting... Finally I saw a letter titled Zend licenses created. When I opened it, I was asked to go to http://www.zend.com/store/pickup.php to get the license agreement. , at this time, the COOKIE of the Zend website already exists on your machine, so after entering, select Step 3: Download Product License. There will be a Download License written in bold on the side, click to download the license agreement named zend_encoder.dat, and then Then select Step 1: Download the Zend Encoder Unlimited Test Drive v. 1.1.0, select the version you need, I use Windows NT/2K (for PHP 4.0.3 / 4.0.4), another long letter Zend Encoder? Test Drive License Agreement, press the "I ACCEPT" button to start downloading the Zend Encoder Unlimited program. 5. The remaining step is to unzip ZendEncoderUnlimited-TestDrive-1. [1].1.0-PHP_4.0.3-Windows-i386.zip to the c:program files end Encoder Unlimited directory, then copy the zend_encoder.dat file to the c:program files end directory, and run c:program files end Encoder Unlimited directory install_license.reg registry, after success you can use the zendenc.exe program to compile the php source file, the format is as follows: zendenc source file name compiled file name (there are many parameters you can check the help yourself ) 6. Do you think this is the end? ? NO, now running the compiled file in the browser will only produce a burst of garbled code. You also need to download Zend Optimizer? v. 1.0.0 from http://www.zend.com/store/free_download.php?pid=13. Please check the version download. I downloaded FOR WIN, and then Unzip the downloaded ZendOptimizer-1[1].0.0-PHP_4.0.4-Windows-i386.zip to the C:Program Files end Optimizer directory.7. Modify the php.ini file and add two lines zend_optimizer.optimization_level=15 zend_extension_ts="c:program fileszend optimizerzendoptimizer.dll" 8. Restart your WEB SERVER, and then use PHPINFO output to take a look. There will be this paragraph: This program makes use of the Zend scripting language engine: Zend Engine v1.0.4, Copyright (c) 1998-2000 Zend Technologies with Zend Optimizer v1.0.0, Copyright (c) 1998-2000, by Zend Technologies Remember, there is the last line with Zend Optimizer v1.0.0, Copyright (c) 1998-2000, by Zend Technologies, it means that your Zend Optimizer is successfully installed. 9. Let’s test the power of Zend Encoder! Write a test phpinfo.php file: phpinfo(); ?> Then use zendenc phpinfo.php phpinfoencode.php to get a compiled phpinfoencode.php file. Open it to see that the code inside has become like this: Zend 2000112001 1 139 265 ?? 2? A毱LF? n ?l&r 闅殓? 4?21a?6ship446 ┐児%5B?崴?蔯 Execute this phpinfoencode.php file in the browser and find that there are more Generated headers by a TRIAL VERSION of the Zend Encoder(TM) line. OK, you succeeded. . Want to see my output? http://zhanzhen.wayall.com/zendencode.htm I also wanted to test the Zend Cache Test Drive, but found that there is no FOR WIN. . He vomited blood on the spot. . :( I hope someone can introduce the installation instructions of Zend Cache Test Drive. If there are any problems during the installation process, please point them out at http://zhanzhen.wayall.com and I will try my best to answer them :)