转换PHP脚本成为windows的执行程序
Convert a PHP script into a stand-alone windows executableI want to automate a fairly simple task. For this I have written a small PHP script which I run from the command line using PHP-CLI. Now I want to hand over this script to someone but I do not want to:
give away the source code ask him to install PHP on the system Is there a way to create a .exe version of the PHP script. I am really not much worried about de-compilation; I am more worried about asking people to install and configure PHP. php compiler obfuscation php-cli 我需要一个相当简单的自动化任务。我已经写了一个PHP脚本,我从php-cli命令行使用。现在我想让别人使用这个脚本,但我不想泄露把源代码,又不想叫他在系统中安装PHP 有一种方法来创建一个EXE版本的PHP脚本。我不太担心反编译;我更担心请人安装和配置PHP。 PHP编译PHP CLI混淆 Phalanger http://www.php-compiler.net/ http://wiki.php-compiler.net/Phalanger_Wiki http://phalanger.codeplex.com/ Phalanger is a project which was started at Charles University in Prague and was supported by Microsoft. It compiles source code written in the PHP scripting language into CIL (Common Intermediate Language) byte-code. It handles the beginning of a compiling process which is completed by the JIT compiler component of the .NET Framework. It does not address native code generation nor optimization. Its purpose is to compile PHP scripts into .NET assemblies, logical units containing CIL code and meta-data. Bambalam http://www.bambalam.se/bamcompile/ Bambalam PHP EXE Compiler/Embedder is a free command line tool to convert PHP applications to standalone Windows .exe applications. The exe files produced are totally standalone, no need for php dlls etc. The php code is encoded using the Turck MMCache Encode library so it's a perfect solution if you want to distribute your application while protecting your source code. The converter is also suitable for producing .exe files for windowed PHP applications (created using for example the WinBinder library). It's also good for making stand-alone PHP Socket servers/clients (using the php_sockets.dll extension). It's NOT really a compiler in the sense that it doesn't produce native machine code from PHP sources, but it works! ZZEE PHPExe http://www.zzee.com/phpexe/ ZZEE PHPExe compiles PHP, HTML, Javascript, Flash and other web files into Windows GUI exes. You can rapidly develop Windows GUI applications by employing the familiar PHP web paradigm. You can use the same code for online and Windows applications with little or no modification. It is a Commercial product. phc-win http://wiki.swiftlytilting.com/Phc-win The PHP extension bcompiler is used to compile PHP script code into PHP bytecode. This bytecode can be included just like any php file as long as the bcompiler extension is loaded. Once all the bytecode files have been created, a modified Embeder is used to pack all of the project files into the program exe. Requires php5ts.dll php_win32std.dll php_bcompiler.dll php-embed.ini ExeOutput http://www.exeoutput.com/ Commercial WinBinder http://winbinder.org/ PHPDesktop http://code.google.com/p/phpdesktop/ PHP Desktop is an open source project founded by Czarek Tomczak in 2012 to provide a way for developing native desktop applications using web technologies such as PHP, HTML5, JavaScript & SQLite. This project is more than just a PHP to EXE compiler, it embeds a web-browser (Internet Explorer or Chrome embedded), a Mongoose web-server and a PHP interpreter. The development workflow you are used to remains the same, the step of turning an existing website into a desktop application is basically a matter of copying it to "www/" directory. Using SQLite database is optional, you could embed mysql/postgresql database in application's installer. EDIT Another option is to use http://www.appcelerator.com/products/titanium-cross-platform-application-development/ an online compiler that can build executables for a number of different platforms, from a number of different languages including PHP