Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How to prevent illegal distribution of a PHP script?



5:49 am on Sep 12, 2007 (gmt 0)

10+ Year Member

Hi guys,

I wrote a script (payware) a few months ago and I discovered recently that there are a whole bunch of really bad people out there :) How can I prevent people from copying and distributing my script?

I had these ideas, but they all have a significant downsides:

1. Encrypt the php files
Pro :: This will secure the content of my files
Con :: A local component is needed on the server of the customer. I don't want to make the installation of the script more difficult so this is not an option for me.

2. Generate a unique key per customer and check the key on my server - Each script has a unique key and each time the script is executed, a check is performed on a database on my server.
Pro :: easy to implement
Con :: this could generate a lot of load on my server.

Are there any other options I missed? Who has experience with one of the above options?



6:00 am on Sep 12, 2007 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

encrypt your main code only / classes etc and leave the code un-encrypted that customer needs for his local component / information.

place a domain name checking code in start of the script so everytime it is called it checks the hosting domain name and if that matches to your customer's domain name that he had told you at the time of purchase then let the script work otherwise delete your classes code immediately and show unauthorized access message and your selling rights information on the page. this way you wont lose your server resources too.


Featured Threads

Hot Threads This Week

Hot Threads This Month