Jump to content

Compile an exe in realtime using PHP on the server


RapidPHP

Recommended Posts

I wondered if anyone could help shed some light on something I am trying to achieve,

 

I will try and explain as clearly as I can.

Basically using PHP I would like to be able to compile an exe (windows executable)

programmatically on the server in real-time, I know this is possible, but at the moment

am not quite sure how.  To explain; basically we will have a file on our server,

and when the customer has made a successful payment online, using PHP we would

programmatically add a unique code to this file and then compile it to produce a

unique executable (something.exe) in realtime for them to download and install on a Windows PC. 

I hope this makes sense, can anyone help?

Thank you for your help.

 

The part I am struggling with is:

I need to embed a pre-created text file (customer.txt from the server) into an executable,

this executable when ran on a Windows PC must then place the embedded

text file into a specified location e.g. "C\Program Files\Something\customer.txt"

 

So my problems are:

1) To embed a text file into an executable. (programmatically in real-time on the server)

and

2) I need to program the exe to place this file somewhere when ran.

 

Can anyone help in this area?

Neither of these is in scope of PHP.

1) PHP can fwrite a file for you, but it's your compiling environment that should grab it and use it for compilation.

2) This is done by your program, so PHP has nothing to do with it.

Neither of these is in scope of PHP.

1) PHP can fwrite a file for you, but it's your compiling environment that should grab it and use it for compilation.

2) This is done by your program, so PHP has nothing to do with it.

 

Couldn't PHP automate the process a bit though? For example, if you had a compiler locally, you could use PHP to initiate the compiler and send the executable to the browser for download?

 

Could be wrong, though.

Neither of these is in scope of PHP.

1) PHP can fwrite a file for you, but it's your compiling environment that should grab it and use it for compilation.

2) This is done by your program, so PHP has nothing to do with it.

 

Couldn't PHP automate the process a bit though? For example, if you had a compiler locally, you could use PHP to initiate the compiler and send the executable to the browser for download?

 

Could be wrong, though.

 

That is precisly what Mchl pointed out, the rest of the OP's question however is not at all php related.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.