Page 1 of 1

lock a PHP script

Posted: Fri Jan 30, 2009 6:36 am
by yetti
Hello,

Well i kinda realize that the topic title doesn't actually describe the problem.. so here it is:

I made PHP script and compiled it using Bambalam PHP EXE Compiler/Embedder (it's not a script that runs on a server, but locally in an windows environment as an .exe application).

My problem is how to lock the script to a specific computer. Using the MAC Address or the IP is not a good approach since both can be easily changed/emulated.

So the question is how can I lock the script to a specific PC via PHP...

Re: lock a PHP script

Posted: Fri Jan 30, 2009 6:49 am
by Apollo
Strictly you can't, but you might enforce something by saving an ultra secret file or registry key somewhere on the desired computer, and only run when the file or registry key is present (and if its content matches a certain checksum, or whatever).

Or perhaps you can exit immediately if the current computer user or login name is not the same as your computer.