Page 1 of 1

Self-executing PHP

Posted: Fri Sep 19, 2003 10:26 pm
by unixchick
Hey all,

Just wanted some feed back on a project ive been working on...
Ive made a self-contained php script (self_exe_php.zip)...

it works like this...

-write a script that will go [x] bytes into a file and eval() the rest...

-make a EXE (in C or C++ or Assmbely :wink: if you wish) that contains
a program that will parse this script, and a hard copy of the script it self (in the exe)

-then write a script that will add any other given script's encoded form to
the footer of the exe

This creates a binary that will with the aid of php.exe interpet the code
attached to the EXE. (A little hard to explain)

I first got the idea when researching the PECL bcompiler extension, i
found out it didnt work (EDIT: well) on windows. Then i found Turk
MMcache (Here) for
PHP, works great!

The self contained exe works perfectly on my machine.. Feedback and
constructive critisim is greatly appreciated.


(Excuse my baad spelling im only one year into COPPA comliance :D ... serriously)

Dont you hate it when peoples (like mine lol) writing look's like math (b*(a^b)/((o)(d)(sin(3))) with sooooo many parenthesis 8O

Posted: Tue Sep 23, 2003 7:14 pm
by Leviathan
Neat idea, assuming you only want command line-style output.

Ever heard of a quine? Google it if you're not sure. The idea is that a quine is a program that prints itself out (so when you run the code, you get the code as output). Try writing one yourself; it's quite fun :)