lock a PHP script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
yetti
Forum Newbie
Posts: 2
Joined: Fri May 30, 2008 2:02 am

lock a PHP script

Post 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...
User avatar
Apollo
Forum Regular
Posts: 794
Joined: Wed Apr 30, 2008 2:34 am

Re: lock a PHP script

Post 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.
Post Reply