Re: Compiling PHP scripts
| From: | Geoff A. Virgo | Date: | Wed, 28 Nov 2001 18:30:35 +0000 |
| Subject: | Re: Compiling PHP scripts | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-749@lists.php.net to get a copy of this message | ||
At 10:41 AM Wednesday, 11/28/2001, you wrote:
Are all includes/require statements extracted and replaced with actual code of the include... or is this just a option in PHPCompiler?There is an option in PHPCompiler which allows you to replace include() and require() calls at compile-time, but this isn't going to help you out since that brings the included code into the overlay scope and the 6000 char restriction still applies. What I was getting at is simply a main() of sorts. ie. <?php
dl("php_gtk." . strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' ? echo "dll" : "so");
require_once("somefile.src");
require_once("someotherfile.src");
// call main window
gtk::main();?> For an example of this, grab my mediaCat-GTK Win32 installer from either SourceForge or my site. The uncompiled version of the exe will be in the /src directory of your installation folder, assuming you select a full install.
http://prdownloads.sourceforge.net/mediacat-gtk/mediaCat-2.0.7_20011128.exe http://www.mithril.ca/code/php-gtk+/source.php?file=mp3_gtk_exe&type=downloadThis method has some obvious limitations though, especially if you're doing this as a closed project which can't be secured within an internal network. Hmm.... one other thing I should have mentioned. Even if you could compile the entire 15,000+ lines of code using PHPCompiler, it wouldn't really obfuscated the code. PHPCompiler merely tacks the code onto the end of the php.exe binary, and this is done in plain text. It would be a relatively simple task to reverse-engineer the resulting exe to get all program's source. cheers, -geoff ---------- Software doesn't have bugs, it just develops random features.